Add a static attachment to an email that is sent upon creation of a case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 05:11 AM
I know this question has been asked here:
Solved: Using Flow Designer, add attachment to Send Email ... - ServiceNow Community
but I'm wondering if there is an easier more out of the box solution to have an attachment thats always added to a canned email notification that is sent when a case is created.
it wouldn't be a dynamic attachment, so nothing that was added to the case by the user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 05:21 AM
do this
1) create a system property of type string with any value
2) add that static attachment to this sys property record
3) use after insert BR on sys_email and add file on the fly to the outgoing email
I shared solution for something similar 2 years ago
Adding latest attachment from sys_attachment table to sys_email record
You change the table as sn_customerservice_case
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-30-2025 06:03 AM
can you provide a larger screenshot? the one attached is very small and blurry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2025 06:10 AM
So if I am reading this right, we some how add our attachment to the sys_attachment table and then we can add the attachment to the notification using this business rule?
Can you explain Step #2 a bit more? I guess I'm confused on where/how to store the static attachment in order to complete this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2025 05:43 AM
yes some placeholder is required to hold that file.
1) create system property and add that file there
2) after business rule on sys_email with your condition
Hope this image is fine for you
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