Sending an email notification when an attachment is added to an Incident record

amacqueen
Mega Guru

Thanks to @ccajohnson and his advice here https://community.servicenow.com/community?id=community_question&sys_id=bb8b0b61db9cdbc01dcaf3231f96191e I have been able to cretae the event, business rule and notification for this. However there are two other things I would like to achieve. Firstly when I look at the email log for the generated email I see the following - 'Attachment Email.png has been added to Incident INC427265' however when I preview the notification I see 'Attachment 0e606f7adb0f30505384b5f6f3961985 has been added to Incident INC427265' so it looks like the SID of the attachment from the attachment table is being added and ideally I would like the name of the attachment, in this case Email.png.

Secondly and more importantly I would like the outgoing email generated from the notification to include the attachment in this case Email.png.

As I'm not much of a coder I would greatly appreciate any help.

Any questions please ask.

Thanks

 

8 REPLIES 8

DrewW
Mega Sage
Mega Sage

If you notice in that post all the way at the bottom, I posted a note to let people know that there are OOB events that have been added to the system for this now.

For your notifications that you have generated have you selected the "Include attachments" checkbox?

Also without seeing the code/notification content its hard to tell where you went wrong.  But based on what you posted it sounds like you may need to specifically get the value for the "file_name" field, but thats just a guess.

 

Thanks for the promp reply Drew.

I did see your post and I have selected 'Include Attachments' however the attachments are not being added to the outgoing email.

I am using the suggested event from @ccajohnson and his advice here:-

https://community.servicenow.com/community?id=community_question&sys_id=bb8b0b61db9cdbc01dcaf3231f96191e

My business rule is as follows:-

find_real_file.png

 

find_real_file.png

 

find_real_file.png

 

The notification is:-

find_real_file.png

find_real_file.png

 

find_real_file.png

 

I don't get why it isn't attaching the image from the sys_attachment table.

Any help would be much appreciated

Notification table name has to be "incident", not attachment. Try that and let me know if that works

Thanks

amacqueen
Mega Guru

The notification table is Incident

find_real_file.png