- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 06:49 PM
How do I generate a passworded ZIP with a script?
I copied the following zip.min.js script to Script include and tried to save it to generate a ZIP with password, but it failed to save with a JavaScript syntax error.
https://cdn.jsdelivr.net/npm/@zip.js/zip.js/dist/zip.min.js
Is there a better way?
(We are considering not using Integration hub's ZIP step or Utility Action Scope, as they are paid for.)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 07:54 PM
Within ServiceNow it's not possible even with ZIP Step. That step will just create a zip file but not password protected zip.
I have implemented this in the past and steps as below
1) setup mid server
2) use java library zip4j-2.10.0 and load to mid server
3) send the files to mid server along with password you want
4) once all the files are sent, mid server script include will create password protected zip and will attach it to some record of ServiceNow using REST API call
I cannot share the script though but I hope with these steps you should be able to handle the requirement.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 07:29 PM
Creating a password-protected ZIP file directly in ServiceNow isn’t possible natively. However, you can leverage a MID Server and a MID Server script (e.g., PowerShell) to handle this functionality for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2024 07:54 PM
Within ServiceNow it's not possible even with ZIP Step. That step will just create a zip file but not password protected zip.
I have implemented this in the past and steps as below
1) setup mid server
2) use java library zip4j-2.10.0 and load to mid server
3) send the files to mid server along with password you want
4) once all the files are sent, mid server script include will create password protected zip and will attach it to some record of ServiceNow using REST API call
I cannot share the script though but I hope with these steps you should be able to handle the requirement.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 09:41 PM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2025 09:37 PM
Thank you very much. It was very helpful!