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 04:52 AM
Not a best way to send all attachments to user via email, why not give them access to the record and they can view/download the attachments from there
Do you want to schedule this daily? what's your exact requirement.
Your requirement is feasible with custom logic and solution but will take some time to implement.
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
‎02-25-2025 04:55 AM
Hey Ankur,
the Customers already have access to the records. In this case they simply want it done without manual work, save some clicks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-25-2025 04:54 AM
You can refer below link on how to generate PDF of the record and it will attach that file to the record itself.
Generate PDF and attach to the record
Then have notification, event on your table and then use Include Attachment checkbox so that all files on that record are sent via email. This will happen out of the box.
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
‎02-25-2025 04:56 AM
Thanks a lot! I'll take a look into it and report back 🙂