Attachment - Inbound Email Action

Gaurav Kumar15
Giga Guru

Hi All,

 

We are creating Incidents via the Inbound Email Actions. So, whenever an email contains attachment that gets attached to the Incident which got created from that mail. So, can anyone tell me that if we don't want to attach that on the incident from inbound email, then how can we do that.

 

We are using calgary.

 

TIA

19 REPLIES 19

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I'm not aware of a way to prevent the email attachment from being attached to the incident, but you could include some code at the end of your inbound action to delete the attachment from the newly created incident.


The Machine
Kilo Sage

We had to do something close to this but not on a particular inbound action.   Our issue was that we were getting all the signature images for Twitter, Facebook, YouTube, etc.



We created a before (insert) business rule on the sys_attachment table that looks for the file size and the file type of image/png.   and then in the script field current.setAbortAction(true)



This stops from images under 1800 bytes not to attach.   At one point there were 20 attachments in the ticket that were all signature images.



Not sure if that will help you or not.



Thanks!



Mike Bahr


wei2
Tera Contributor

Are you able to share more details about the script?


Sure, here you go.   This is what we use to prevent those signature images from attaching in a record.



minimum attachment br.PNG