- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 03:43 AM
Hello Everyone,
I need to implement a backend validation in ServiceNow to check if an uploaded 7zip (.7z) file is password-protected or encrypted. The requirement is:
- When a 7zip file is uploaded as an attachment (e.g., in sys_attachment), we need to determine if it is encrypted.
- If the file is not encrypted, it should be removed automatically.
- This check needs to happen entirely from the backend (Server-side).
I’m looking for suggestions on:
✅ How to detect encryption in a 7zip file from ServiceNow’s backend.
✅ Any possible use of Glide APIs, Script Includes, or other ServiceNow features.
✅ Whether ServiceNow has any built-in utilities for file parsing like it does for Excel (e.g., GlideExcelParser).
Has anyone implemented something similar or knows an approach to achieve this? Any help would be appreciated!
Thanks in advance!
CC: @Ankur Bawiskar @Dr Atul G- LNG @Ravi Gaurav @Pradeep Sharma @Chuck Tomasi@Brad Bowman
Thanks
Bhushan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:08 AM
Nothing is present OOB to check if file is password-protected or encrypted.
You will have to use custom solution by using mid server and external jar files to determine this.
OR
may be some javascript library which can be used via UI script
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
04-27-2025 11:57 PM - edited 04-28-2025 02:22 AM
Hello @Ankur Bawiskar ,
For MID Server ZIP Password Protection Validation,
I have successfully completed the following setup:
Installed and validated MID Server, with 7-Zip installed at "C:\Program Files\7-Zip\7z.exe".
Created a PowerShell script in MID Server Scripts module to download attachment by sys_id, validate password protection, and send results back via ECC Queue.
Built a Business Rule on sys_attachment (after insert) to trigger ECC Queue and run the MID Server script.
Built a Business Rule on ecc_queue (after insert) to parse the MID Server response, update attachment/incident records, delete unprotected files, and toggle the "custom_field" field.
Added the "custom_field" Boolean field on the parent table (e.g., Incident) with an onChange Client Script to reload the form after processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 11:57 PM - edited 04-28-2025 02:22 AM
Hello @Ankur Bawiskar ,
For MID Server ZIP Password Protection Validation,
I have successfully completed the following setup:
Installed and validated MID Server, with 7-Zip installed at "C:\Program Files\7-Zip\7z.exe".
Created a PowerShell script in MID Server Scripts module to download attachment by sys_id, validate password protection, and send results back via ECC Queue.
Built a Business Rule on sys_attachment (after insert) to trigger ECC Queue and run the MID Server script.
Built a Business Rule on ecc_queue (after insert) to parse the MID Server response, update attachment/incident records, delete unprotected files, and toggle the "custom_field" field.
Added the "custom_field" Boolean field on the parent table (e.g., Incident) with an onChange Client Script to reload the form after processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2025 12:02 AM
it would be nice if you could share the scripts etc so that it helps other members as well
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 04:23 AM
@bhushannerkar There is no OOTB way to verify if the uploaded attachment is encrypted or not.