- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 09:19 PM
I need a specific pdf document to be attached physically to the email notification when it's sent out. It shouldn't be a link to the pdf but it should be a physical file where the users can access the pdf without Servicenow access. How can it be achieved? Also, I need to know how to test the whether the attachment is included or not in email logs? Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 10:30 PM
yes it's possible. but the file has to be stored in some record.
I shared solution for something similar 2 years ago
Adding latest attachment from sys_attachment table to sys_email record
1) create a system property and add your file to it
2) then create after insert BR on sys_email with condition as this
You change the table as sc_req_item
BR script
(function executeRule(current, previous /*null when async*/) {
var propertyRecordSysId = ''; // give here the sysId of newly created system property record where file is present
var s_Attach = new GlideRecord('sys_attachment');
s_Attach.addEncodedQuery('table_sys_id=' + propertyRecordSysId);
s_Attach.query();
if(s_Attach.next()){
var rec = new GlideRecord('sys_email_attachment');
rec.initialize();
rec.attachment = s_Attach.sys_id;
rec.file_name = s_Attach.file_name;
rec.source = 'notification';
rec.content_disposition = 'attachment';
rec.email = current.sys_id;
rec.insert();
}
})(current, previous);
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-07-2025 11:40 PM
yes if it comes in email attachment tab then it will be sent, it's OOB
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-07-2025 11:40 PM
yes if it comes in email attachment tab then it will be sent, it's OOB
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-08-2025 12:09 AM
I believe you should mark this response correct as well so that it helps future readers.
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-07-2025 10:05 PM - edited ‎01-07-2025 10:09 PM
Hello @Bonam Yasaswini
As suggested by Ankur you can configure over your notification which you have setup which will be triggered on your conditions. See below snip where you need to configure over your notification.
For testing part in your lower instance, you can set the trap email to your email and enabling email sending property as true. See below snip to configure over lower instance and make sure you revert it back after your testing.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 10:08 PM
@Viraj Hudlikar
Is there any way of adding it in the email instead of adding the file on every ritm rceord? Since the RITM is the trigger record for this notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2025 10:15 PM
@Bonam Yasaswini
We are not adding on every RITM record as I believe that notification you created is specific for Catalog Item. If not, then try to create a separate notification which will be triggered for this particular catalog item based on your condition and the one which is sent for all there you can exclude that catalog item in conditions.
Note - Attachment will be on notification and as shared in above reply check how to configure it.
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.