The CreatorCon Call for Content is officially open! Get started here.

Attachment Not Included in Email Notification

gnunez
Kilo Guru

Hello all,

I want to include an attachment in our "request completed" email notification. I have uploaded the attachment to the email notification and selected the "Include Attachments" checkbox, but it isn't being uploaded. I thought it was suppose to simple and "include attachments" would attach it but thats not the case. Am I misunderstanding how this checkbox works or does anyone know another way to accomplish this?

Thanks,

Grace

1 ACCEPTED SOLUTION

Sam198
Mega Guru

Hi gnunez,

You can pick up and attach the notification physical attachment to the actual email with a Business Rule on sys_email table:

Before - Insert

Condition:

Subject Starts with = Your subject (or as per your requirement when this BR should run and attach the attachment),

 

var attachment = new GlideRecord('sysevent_email_action');

if(current.subject == "your email subject"){
attachment.addQuery('name', 'Your notification name');


}

attachment.query();

while (attachment.next()) {

strTemp = attachment.sys_id.toString();
GlideSysAttachment.copy('sysevent_email_action', strTemp, 'sys_email', current.sys_id);

View solution in original post

11 REPLIES 11

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

Include attachments means it will include the attachments from the record that generated the email and NOT the email notification itself.  In other words, the attachment would need to be on the linked sc_request/sc_req_item record.

Dhananjay Pawar
Kilo Sage

Hi,

 

The purpose of that checkbox is-

 

Include attachmentsSelect this check box to send all attachments from the triggering record as email attachments.

Thanks for the reply. No wonder the attachment isn't showing. I added it to the email notification and selected "include attachments", but it wasn't attached.

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

The attachments it picks is for the table record which is triggering the email

Example: if you are having attachment on Incident record INC001 and your email notification is on incident table and it triggers when INC001 is resolved; it would pick attachments added to INC001

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader