- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2023 01:01 PM
I'm using the below script to create a request from an inbound email that will have attachments The workflow that runs for this request sends out an approval notification and this notification is checked to "Include Attachments", but the attachments are not on the approval email. I've verified that the email log Action says "Attached to the Target Record" and the RITM of the REQ has the attachments, but the approval email does not have the attachment for the approver to review. Can someone tell me what is missing?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 05:50 AM
Include attachment works when the record on which notification triggers has file attached to it.
I consider your email is on sysapproval_approver table
So unless you attach file to approval record it won't send the file as attachment in email
So you copy the file from RITM to approval record using GlideSysAttachment.copy() method and then it will work
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
07-12-2023 01:20 PM
Hi, based on details in your post I would suspect your issue that is the approval notification is triggered from a record on the sysapproval_approver table, but your attachments are on the approvals related task IE sc_request and so the notification 'attachment' flag has no impact as the triggering record has no attachments.
You could try copying the attachments from your request to the approval record, but this does result in an increased overhead as the attachments are effectively duplicated across X number of approval records.
A variation of this notification email script from SNCGuru may also provide a solution, by adding links to attachments in the email message.
Send an Email Notification with Associated Attachments - ServiceNow Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 05:28 AM
Hi Tony,
Thanks for your response. I would prefer to have the attachment on the approval notification. Do you have an example of how this may be accomplished. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 09:47 AM
I ended up putting an async before business rule in place with the below script to copy the attachments from the RITM to the approval notifications.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2023 05:50 AM
Include attachment works when the record on which notification triggers has file attached to it.
I consider your email is on sysapproval_approver table
So unless you attach file to approval record it won't send the file as attachment in email
So you copy the file from RITM to approval record using GlideSysAttachment.copy() method and then it will work
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