<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Strip Email Attachments Inbound Action in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469024#M125950</link>
    <description>&lt;P&gt;I found that I had to remove the last part of the condition in my instance to make this work. &amp;nbsp; .&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &amp;amp;&amp;amp; current.table_name.toLowerCase() != 'sys_email'&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;If I leave that one there, it still attaches the images from the signature. If I remove it, it acts as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;I am wondering if I am creating an type of issue by removing it.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;-Chris&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 04 Feb 2015 16:17:24 GMT</pubDate>
    <dc:creator>Nickels</dc:creator>
    <dc:date>2015-02-04T16:17:24Z</dc:date>
    <item>
      <title>Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469018#M125944</link>
      <description>&lt;P&gt;Hello -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have looked at some examples posted already and setup something similar. &amp;nbsp; 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. &amp;nbsp; If i turn off this busienss rule, it works fine again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what the issue may be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(see attached business rule detail)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2015 19:45:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469018#M125944</guid>
      <dc:creator>wmahmud1</dc:creator>
      <dc:date>2015-01-27T19:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469019#M125945</link>
      <description>&lt;P&gt;I found this, or the starters for this on here somewhere, but we have this&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;in &lt;STRONG&gt;sys_attachment&lt;/STRONG&gt;, create a &lt;STRONG&gt;Before Insert&lt;/STRONG&gt; Business rule&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The condition is&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;parseInt(current.size_bytes) &amp;lt;= 1800 &amp;amp;&amp;amp; current.content_type.toLowerCase().indexOf('image') != -1 &amp;amp;&amp;amp; current.table_name.toLowerCase().indexOf('zz_yy') == -1 &amp;amp;&amp;amp; current.table_name.toLowerCase() != 'sys_email'&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;and the script of&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14223887603642965" jivemacro_uid="_14223887603642965"&gt;
&lt;P&gt;current.setAbortAction(true);&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;//gs.log(current.file_name + ' : insert aborted');&lt;/P&gt;&lt;BR /&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jan 2015 19:59:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469019#M125945</guid>
      <dc:creator>poyntzj</dc:creator>
      <dc:date>2015-01-27T19:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469020#M125946</link>
      <description>&lt;P&gt;And yours has parse&lt;STRONG&gt;INT&lt;/STRONG&gt; when it should be &lt;STRONG&gt;parseInt&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Your routine will kill any small file, the one I have limits it to image files only.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Cheers&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jan 2015 20:01:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469020#M125946</guid>
      <dc:creator>poyntzj</dc:creator>
      <dc:date>2015-01-27T20:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469021#M125947</link>
      <description>&lt;P&gt;Thank you Julian — looks like ParseInt was the issue (in another example I saw it as ParseINT).&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jan 2015 20:28:11 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469021#M125947</guid>
      <dc:creator>wmahmud1</dc:creator>
      <dc:date>2015-01-27T20:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469022#M125948</link>
      <description>&lt;P&gt;Thank you for posting this. &amp;nbsp; I was looking at stripping the images based on the file names but I was worried about removing a needed attachment.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 29 Jan 2015 22:48:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469022#M125948</guid>
      <dc:creator>Nickels</dc:creator>
      <dc:date>2015-01-29T22:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469023#M125949</link>
      <description>&lt;P&gt;If you want to be sure, look at the sys_attachment table and using the graphics types look at the typical sizes.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;from there you can gauge the normal sizes and change to the code to cover it.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;A lot of the attached images are called image???.??? so you could add that as part of the condition&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Only feedback we have had is positive as sometimes an engineer would look at a ticket that has had a lot of correspondence and find a &lt;STRONG&gt;lot&lt;/STRONG&gt; of image attachments. &amp;nbsp; This could take a while to locate the relevant image / document they were after. &amp;nbsp; Now, all the image attachments are gone it is far easier &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://www.servicenow.com/6.0.3.0/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jan 2015 09:46:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469023#M125949</guid>
      <dc:creator>poyntzj</dc:creator>
      <dc:date>2015-01-30T09:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469024#M125950</link>
      <description>&lt;P&gt;I found that I had to remove the last part of the condition in my instance to make this work. &amp;nbsp; .&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt; &amp;amp;&amp;amp; current.table_name.toLowerCase() != 'sys_email'&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;If I leave that one there, it still attaches the images from the signature. If I remove it, it acts as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;I am wondering if I am creating an type of issue by removing it.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;-Chris&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2015 16:17:24 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469024#M125950</guid>
      <dc:creator>Nickels</dc:creator>
      <dc:date>2015-02-04T16:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469025#M125951</link>
      <description>&lt;P&gt;to restrict the option to emails.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Feb 2015 16:26:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469025#M125951</guid>
      <dc:creator>poyntzj</dc:creator>
      <dc:date>2015-02-04T16:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469026#M125952</link>
      <description>&lt;P&gt;I'm encountering the same issue as Chris above. &amp;nbsp; Can someone explain why the process is failing with this line of code or what I'm misunderstanding?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I read it as "only strip attachments when the table name is not sys_email". &amp;nbsp; When I look at the sys_attachment table, there's only a few that show a table_name of sys_email. &amp;nbsp; I would have thought an attachment appearing on "new_call" for example would have been stripped with this line in the code, but that is not the case.. &amp;nbsp; Incidentally, if I change it to == 'sys_email' the BR works properly. &amp;nbsp; I must be misunderstanding something, I just don't know what.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14249009929032216" jivemacro_uid="_14249009929032216"&gt;&lt;SPAN style="color: #666666; font-family: 'courier new', courier;"&gt;current.table_name.toLowerCase() != 'sys_email'&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Feb 2015 21:49:59 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469026#M125952</guid>
      <dc:creator>scottatah</dc:creator>
      <dc:date>2015-02-25T21:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469027#M125953</link>
      <description>&lt;P&gt;Hi Scott, yes you are correct. I typed that line wrong. &lt;/P&gt;&lt;BR /&gt;&lt;P&gt;it should be&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;amp;&amp;amp; current.table_name.toLowerCase() == 'sys_email'&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;to process just email attachments&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Feb 2015 10:19:54 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469027#M125953</guid>
      <dc:creator>poyntzj</dc:creator>
      <dc:date>2015-02-26T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469028#M125954</link>
      <description>&lt;P&gt;Though this is an older post, in case anyone runs across this looking for a solution, there is a new feature in Jakarta that allows a bit more control over what happens to inline image attachments on an inbound email. This is oriented toward handling small attachments typical of logos or signature images.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;See the &lt;A title="ocs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/notification/concept/email-image-filters.html" href="https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/notification/concept/email-image-filters.html"&gt;Jakarta docs here&lt;/A&gt;.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;This is &amp;nbsp; a basic byte-size based filter with the ability to dictate what happens to any attachment when less than the byte size&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;AttachTarget - does what most are used to today - associates the attachment to the target record.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;AttachEmail - &amp;nbsp; associates the attachment with the sys_email record.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;AttachNone - leaves the attachment orphaned and unattached to any target record. &amp;nbsp; (Allows "Preview Email' to still show the inline image.)&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Why no "Delete" action? &amp;nbsp; If you don't store the attachment, then the "Preview Email" pane will show a broken link because there is no more image to reference. &amp;nbsp; Use AttachNone.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Sep 2017 23:31:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469028#M125954</guid>
      <dc:creator>Dub Myers</dc:creator>
      <dc:date>2017-09-20T23:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469029#M125955</link>
      <description>&lt;P&gt;Hmm...I've tried to use this and set the minimum to 39000 bytes aka 39KB and we still have images getting through that are like 3KB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pretty frustrating.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone has anything else that can work, please let me know!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 13:55:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469029#M125955</guid>
      <dc:creator>Allen Andreas</dc:creator>
      <dc:date>2018-03-14T13:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469030#M125956</link>
      <description>&lt;P&gt;Did you get this to work eventually?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It sounds like you already tried this, but one interesting item is that AttachTarget is the default value of the&amp;nbsp;'glide.email.inbound.image_sys_attachment.filter.action' property.&amp;nbsp; That means if you set the&amp;nbsp;'glide.email.inbound.image_sys_attachment.filter.minimum_bytes' property only, the default&amp;nbsp;action&amp;nbsp;will still be to attach it to the target record.&amp;nbsp; Both need to be&amp;nbsp;set to make it work.&lt;/P&gt;
&lt;P&gt;For the attachment that made it through unexpectedly, you are saying this, correct?&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;You are on Jakarta or later?&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;'glide.email.inbound.image_sys_attachment.filter.action' is "AttachNone"?&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;'glide.email.inbound.image_sys_attachment.filter.minimum_bytes' is 39000?&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;The one that made it through unexpectedly:&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;sys_attachment.size_bytes is ~3000 bytes?&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;sys_attachment.content_type starts with "image" (e.g. 'image/png', 'image/jpg', etc)?&lt;/P&gt;
&lt;P&gt;Barring other business rule customizations interacting here, if those are your conditions, and it is not behaving as expected, I'd open an incident with ServiceNow support to see what is going on.&lt;/P&gt;
&lt;P style="padding-left: 60px;"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 22:52:10 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469030#M125956</guid>
      <dc:creator>Dub Myers</dc:creator>
      <dc:date>2018-05-15T22:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469031#M125957</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have been using the below for months in production and it works a treat - we use this to remove all the email signature logo's (we have over 9 on our standard signature).&lt;/P&gt;
&lt;P&gt;Created a Business rule - ADVANCED, BEFORE, INSERT&lt;/P&gt;
&lt;P&gt;Condition:&amp;nbsp;&amp;nbsp;parseInt(current.size_bytes) &amp;lt;= 5000&lt;/P&gt;
&lt;P&gt;Script:&lt;/P&gt;
&lt;PRE class="language-java"&gt;&lt;CODE&gt;//  code added to check email attachments and remove if the size is equal or less than that specified in the condition
//  CJF 5/4/17 - Post MVP Incident Go-Live
//  CJF 17/4/18 - Updated to remove new HR Email Banner pictures from new templates

(function executeRule(current, previous /*null when async*/) {
 
  var email_log = new GlideRecord('syslog');
  var email = new GlideRecord('sys_email');
  email.addQuery('instance',current.table_sys_id);
  email.orderByDesc('sys_created_on');
  email.query();
  var email_sys_id ='';
  var email_text = '';
  var imagename = current.file_name;
  if(email.next())
      {
      email_sys_id = email.sys_id;
  }
  email_text = 'EMAIL'+'.'+email_sys_id;
  email_log.addQuery('source','CONTAINS', email_text);
  email_log.addQuery('message','CONTAINS',imagename);
  email_log.query();
  if(email_log.next())
  {
     current.setAbortAction(true);
  }
 
})(current, previous);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps&lt;/P&gt;
&lt;P&gt;Cheers Carl.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...please mark correct or helpful where appropriate&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 23:21:14 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469031#M125957</guid>
      <dc:creator>Carl Fransen1</dc:creator>
      <dc:date>2018-05-15T23:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469032#M125958</link>
      <description>&lt;P&gt;Did you find a solution that worked?&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 14:54:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469032#M125958</guid>
      <dc:creator>brianlan25</dc:creator>
      <dc:date>2018-05-16T14:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469033#M125959</link>
      <description>&lt;P&gt;my solution works... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 18:56:04 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469033#M125959</guid>
      <dc:creator>Carl Fransen1</dc:creator>
      <dc:date>2018-05-16T18:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469034#M125960</link>
      <description>&lt;P&gt;unfortunately the images in our email signatures are larger then 5000 and doing some testing increasing the size bigger then that could cause legitimate screenshots from being attached.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 19:51:38 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469034#M125960</guid>
      <dc:creator>brianlan25</dc:creator>
      <dc:date>2018-05-16T19:51:38Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469035#M125961</link>
      <description>&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;parseInt(current.size_bytes) &amp;lt;= 5000 || parseInt(current.size_bytes) == 27591 || parseInt(current.size_bytes) == 29272 || parseInt(current.size_bytes) == 29251&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 19:58:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469035#M125961</guid>
      <dc:creator>Carl Fransen1</dc:creator>
      <dc:date>2018-05-16T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469036#M125962</link>
      <description>&lt;P&gt;Hi Carl,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found this works great, however, we have customers that send thing in text documents and in some cases are under the size of the signature attachments. Any thoughts on how to suppress the sig attachments but allow others through?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 12:53:41 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469036#M125962</guid>
      <dc:creator>AndyB5000</dc:creator>
      <dc:date>2018-09-17T12:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Strip Email Attachments Inbound Action</title>
      <link>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469037#M125963</link>
      <description>&lt;P&gt;We don't have smaller files being attached so it's not an issue for us.&amp;nbsp; When we tested our code initially we used things like a blank word document - which was 19KB, well over the 5000 bytes on our condition, and we did the same testing with images and other file types. We also looked in the images inside ServiceNow to determine what is being sent and our 5000 bytes covered all of our requirements.&lt;/P&gt;
&lt;P&gt;You could look at saving all your signature files to images, finding the exact size as I mentioned to Brian in another one of my posts and then specifically excluding these in your condition - as below:&lt;/P&gt;
&lt;P&gt;parseInt(current.size_bytes) &amp;lt;= 5000 || parseInt(current.size_bytes) == 27591 || parseInt(current.size_bytes) == 29272 || parseInt(current.size_bytes) == 29251&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Carl.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2018 18:44:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/strip-email-attachments-inbound-action/m-p/1469037#M125963</guid>
      <dc:creator>Carl Fransen1</dc:creator>
      <dc:date>2018-09-17T18:44:47Z</dc:date>
    </item>
  </channel>
</rss>

