Avoid attachments less than 10kb to get attached to incidents received via reply email to servicenow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello Everyone,
When servicenow receives emails as reply we have a inbound email action it by default oob attaches the attachments to the target incident/record .
Now we wanted to avoid less than 10kb files to get attached to the target record.
for images to avoid less than 10kb we have oob property "glide.email.inbound.image_sys_attachment.filter.minimum_bytes" but what about other file types how we can avoid that what ever attachments are coming in emails?
@Ankur Bawiskar any suggestions?
Regards,
Debasis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello @Ankur Bawiskar ,
Even i do not write the copy logic it always copies the attachments to the target incident.
also with your advise i have updated my below script but it is copying everything
without copying script:
}
in both the scenarios attachments are getting copied oob to the target record irrespective of i do write the copy logic in my inbound action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
then you can use after update business rule on incident table and identify if the comments got changed and starts with reply from:
If yes then iterate and determine which file is less and delete from sys_attachment
OR
Another way is
-> after insert BR on sys_journal_field with condition as this
-> then iterate sys_attachment and handle the deletion logic
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@Ankur Bawiskar ,
Just out of curiosity can i write after business rule on after insert and directly i can put when to run conditions as source as inbound email and attctment.size_bytes less than 10240 and then in script get current.attachment.sysid then glide to attachment table and dete the attchment?
can i do this to achieve?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
Hello @Ankur Bawiskar ,
@Ankur Bawiskar ,
Just out of curiosity can i write after business rule on after insert and directly i can put when to run conditions as source as inbound email and attctment.size_bytes less than 10240 and then in script get current.attachment.sysid then glide to attachment table and dete the attchment?
can i do this to achieve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
18 hours ago
Did the approach I shared earlier work for you?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader