<?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 Remove Watermark from email body of incoming emails in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841401#M498327</link>
    <description>&lt;P&gt;We get emails from third party vendor servicenow instance to my client instance related to vendor incident and service requests. As soon as the email hits the client instance, a call record has to be created. I configured an inbound email action for this but the incoming vendor email has watermark because of this my inbound action is not triggered and the email is getting ignored. Could anyone please let me know the script to remove watermark from email body.&lt;/P&gt;
&lt;P&gt;I referred this post:&amp;nbsp;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=bb064b61db1cdbc01dcaf3231f9619a6 but I am not sure on the code of how to remove the watermark from email body.&lt;/P&gt;
&lt;P&gt;So any scripting help on this is really appreciated.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2020 12:08:36 GMT</pubDate>
    <dc:creator>Developer3</dc:creator>
    <dc:date>2020-09-18T12:08:36Z</dc:date>
    <item>
      <title>Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841401#M498327</link>
      <description>&lt;P&gt;We get emails from third party vendor servicenow instance to my client instance related to vendor incident and service requests. As soon as the email hits the client instance, a call record has to be created. I configured an inbound email action for this but the incoming vendor email has watermark because of this my inbound action is not triggered and the email is getting ignored. Could anyone please let me know the script to remove watermark from email body.&lt;/P&gt;
&lt;P&gt;I referred this post:&amp;nbsp;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=bb064b61db1cdbc01dcaf3231f9619a6 but I am not sure on the code of how to remove the watermark from email body.&lt;/P&gt;
&lt;P&gt;So any scripting help on this is really appreciated.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:08:36 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841401#M498327</guid>
      <dc:creator>Developer3</dc:creator>
      <dc:date>2020-09-18T12:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841402#M498328</link>
      <description>&lt;P&gt;Have you tried below?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/notification/task/t_OmitWatermarksIndEmailNotif.html" target="_blank"&gt;Omit an email notification watermark | Servicenow Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:14:09 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841402#M498328</guid>
      <dc:creator>MrMuhammad</dc:creator>
      <dc:date>2020-09-18T12:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841403#M498329</link>
      <description>&lt;P&gt;Set the 'Omit Watermark field to true in the notification&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="find_real_file.png"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/47375iDF2CA2D44C47CF6C/image-size/large?v=v2&amp;amp;px=999" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:16:06 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841403#M498329</guid>
      <dc:creator>mr18</dc:creator>
      <dc:date>2020-09-18T12:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841404#M498330</link>
      <description>&lt;P&gt;Hi Both,&lt;/P&gt;
&lt;P&gt;"Omit watermark"&amp;nbsp;is for outgoing notifications. I am asking about inbound emails&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:17:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841404#M498330</guid>
      <dc:creator>Developer3</dc:creator>
      <dc:date>2020-09-18T12:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841405#M498331</link>
      <description>&lt;P&gt;It might help you&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=bb064b61db1cdbc01dcaf3231f9619a6"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=bb064b61db1cdbc01dcaf3231f9619a6&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:21:25 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841405#M498331</guid>
      <dc:creator>mr18</dc:creator>
      <dc:date>2020-09-18T12:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841406#M498332</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Check below links&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=869e4b92dbed23002737e15b8a96192b"&gt;https://community.servicenow.com/community?id=community_question&amp;amp;sys_id=869e4b92dbed23002737e15b8a96192b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.servicenow.com/community?id=community_blog&amp;amp;sys_id=bc7c22e1dbd0dbc01dcaf3231f961996"&gt;https://community.servicenow.com/community?id=community_blog&amp;amp;sys_id=bc7c22e1dbd0dbc01dcaf3231f961996&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If my answer helped you in any way, mark answer as helpful and correct.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks and Regards,&lt;/P&gt;
&lt;P&gt;Megha&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:23:29 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841406#M498332</guid>
      <dc:creator>Megha Padale</dc:creator>
      <dc:date>2020-09-18T12:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841407#M498333</link>
      <description>&lt;P&gt;This is the same link i mentioned in my question.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:28:31 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841407#M498333</guid>
      <dc:creator>Developer3</dc:creator>
      <dc:date>2020-09-18T12:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841408#M498334</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try below (untested) a &lt;STRONG&gt;business&lt;/STRONG&gt; rule that runs &lt;STRONG&gt;before insert/update&lt;/STRONG&gt; on &lt;STRONG&gt;sys_email&lt;/STRONG&gt; table.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;When to Run:&lt;/STRONG&gt; Required conditions or recipient list to make it specific. Else it will run for all mail that are received.&lt;/P&gt;
&lt;P&gt;Suppose, &lt;EM&gt;Subject contains ABC&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Script:&lt;/P&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;(function executeRule(current, previous /*null when async*/ ) {

    var getwatermark = new GlideRecord('sys_email');
    getwatermark.query();
    if (getwatermark.next()) {
        var bodyhastext = getwatermark.body;
        bodyhastext = bodyhastext.replace(/MSG0042550/g, '');//Suppose my watermark is of form :  //Ref:MSG0042550 so it replaces it with empty
        getwatermark.body = bodyhastext;
        getwatermark.update();

    }

    //Ref:MSG0042550

})(current, previous);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use your own logic as per your watermark text. In case you can also use split or substring methods for removing watermark,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: This has high impact on the performance of system&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:59:47 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841408#M498334</guid>
      <dc:creator>Jaspal Singh</dc:creator>
      <dc:date>2020-09-18T12:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841409#M498335</link>
      <description>&lt;P&gt;But we cannot run gr.update() on "before" business rule correct?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 13:05:02 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841409#M498335</guid>
      <dc:creator>Developer3</dc:creator>
      <dc:date>2020-09-18T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Watermark from email body of incoming emails</title>
      <link>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841410#M498336</link>
      <description>&lt;P&gt;My Bad! It is not required. It should work without .update() as well as its before.&lt;/P&gt;
&lt;P&gt;Only reason to avoid its usage it make it run twice &amp;amp; avoid unnecessary load which does not have any impact apart from performance but yes it is recommended not to use. Just try it without .update() once for a check.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 13:34:49 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/remove-watermark-from-email-body-of-incoming-emails/m-p/1841410#M498336</guid>
      <dc:creator>Jaspal Singh</dc:creator>
      <dc:date>2020-09-18T13:34:49Z</dc:date>
    </item>
  </channel>
</rss>

