Strip Email Attachments Inbound Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2015 11:45 AM
Hello -
I am trying to strip all attachments that get picked up by ServiceNow under 5000 bytes so we can avoid unecessary attachments of users signatures to records.
I have looked at some examples posted already and setup something similar. My issue is, the business rule on the sys_attachment table seems to run as I can see the script log showing the name of the file being aborted, but the email log itself, is not capturing the target (remains as empty) and not communicating back to the record. If i turn off this busienss rule, it works fine again.
Any ideas what the issue may be?
(see attached business rule detail)
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2018 12:58 PM
What I did to get around that is to add specific OR queries to the condition as I found the signature images are all exactly the same size and I have been able to specifically remove thos, see below for full condition string:
parseInt(current.size_bytes) <= 5000 || parseInt(current.size_bytes) == 27591 || parseInt(current.size_bytes) == 29272 || parseInt(current.size_bytes) == 29251
What I also found was that the size was the 'size on disk', not the 'file size' when you right-click and look at the properties of the file to gain the exact size.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2018 03:59 PM
Carl -- this worked great! thank you for this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2018 04:09 PM
You're welcome - glad it worked for you, I love this community!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2019 06:29 AM
This is a way to filter out certain images from being imported into SN? for example, if a user emails #itsm. and they have the aarons logo in their signature, that gets imported into the incident as well as linkedin, etc...
Email image filtering properties:
In the filter navigator navigate to: sys_properties.list
search glide.email.inbound.image_sys_attachment.filter.minimum_bytes : In this property you can use to specify the minimum size of attachments which you can definitely use to filter out those pesky linkedin and twitter logo's and most other signature images depending on how ostentatious the signature it.
I set this value to 5000
glide.email.inbound.image_sys_attachment.filter.action : you can use to filter images and either attach to the record, attach to the email or not attach at all.