Export Record with Attachments and Send via Email in ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 04:11 AM
Hi everyone,
I am trying to automate the process of exporting a record along with its attachments and sending it via email in ServiceNow. My goal is to:
- Export a record from a table (e.g., Legal Matter / Legal Req) as a file (CSV, PDF, or JSON).
- Retrieve all attachments associated with that record.
- Send an email with both the exported record and its existing attachments.
I’d appreciate any insights, best practices, or example scripts that can help!
Thanks in advance! 😊
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 05:47 AM
the above approach shared by me would work.
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 05:00 AM
I don't have technical solution for this but
I am trying to automate the process of exporting a record along with its attachments and sending it via email in ServiceNow. My goal is to:
- Export a record from a table (e.g., Legal Matter / Legal Req) as a file (CSV, PDF, or JSON).
Atul: What about if the count is more than 10000, OOTB there is a limit. What value does Json serve if you send the records to the client? It may impact the performance, so try/schedule OOO only.
- Retrieve all attachments associated with that record.
Atul: Sometimes few attachments are heavy in size and it will be more problem for a user who receives an email when this attachment is added and if multiple versions exits.
- Send an email with both the exported record and its existing attachments.
Atul: Sending emails is not a big deal, but the issue is many users have an auto rule and then in this case emails go into a folder and the user may not open those emails again So please reconsider these points before you implement them.
It is more on education issues instead of automation.