<?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: Inbound Email as Attachment on Call Record in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758528#M415454</link>
    <description>&lt;P&gt;Sadly, I didn't pursue it all the way through. &amp;nbsp; After getting to this point, I basically validated that it was possible to do this but didn't troubleshoot it all the way to the end.&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 02 Jan 2018 20:22:46 GMT</pubDate>
    <dc:creator>Shea Laughlin</dc:creator>
    <dc:date>2018-01-02T20:22:46Z</dc:date>
    <item>
      <title>Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758518#M415444</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In our instance (Helsinki), we currently have inbound emails generating Call records for our Service Desk to work and determine the appropriate path (Incident, Request, etc.).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On this inbound email action, I have attempted to add a script under the Action tab to attach the inbound email(.eml) to the Call record as an attachment. This is useful for our environment because in many situations the customer will cc others already working on, or have worked on in the past, whatever they are reporting or requesting. The Service Desk can view that original email and get a quick understanding of the escalation path for that record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am honestly a novice at scripting and I pull most of my scripts from the rock stars around this community! Do any of you have a few moments to take a look at the script below to let me know if I am completely out in left field with what I have up to this point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var strEmailContent = email.content_type +"\n"+ email.headers;&lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strEmailContent += "\n\n\n\n"+ email.body;&lt;/P&gt;&lt;P&gt;var sa = new GlideSysAttachment(); &lt;/P&gt;&lt;P&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sa.write(current, strFileName +".eml", " application/octet-stream ", strEmailContent);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your time!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 17:38:13 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758518#M415444</guid>
      <dc:creator>nathanjulo43</dc:creator>
      <dc:date>2017-03-17T17:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758519#M415445</link>
      <description>&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;try this ..&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;var strEmailContent = email.content_type +"\n"+ email.headers + "\n\n\n\n"+ email.body;&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;var sa = new GlideSysAttachment();&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;var cr = new GlideRecord('new_call');&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;cr.initialize();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;cr.short_description = email.subject;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;cr.description =email.body_text;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;// map fields that are mandatory or necessary'&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;sa.write(cr, email.subject +".eml", " application/octet-stream ", strEmailContent);&lt;/P&gt;&lt;BR /&gt;&lt;P style="font-family: arial, sans-serif; color: #666666;"&gt;cr.insert();&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2017 18:29:48 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758519#M415445</guid>
      <dc:creator>sujalavemula</dc:creator>
      <dc:date>2017-03-17T18:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758520#M415446</link>
      <description>&lt;P&gt;Thank you, Sujala! Unfortunately, when testing this script I discovered this actually just creates an additional Call record with the email details instead of adding the .eml file that generated the Call record as an attachment.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2017 18:36:35 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758520#M415446</guid>
      <dc:creator>nathanjulo43</dc:creator>
      <dc:date>2017-03-17T18:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758521#M415447</link>
      <description>&lt;P&gt;try this .It works for me .. it should work for you too &lt;SPAN __jive_emoticon_name="happy" __jive_macro_name="emoticon" class="jive_emote jive_macro" data-renderedposition="8_330.796875_16_16" src="https://www.servicenow.com/8.0.4.21bdc7e/images/emoticons/happy.png"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; // Implement email action here&lt;/P&gt;&lt;BR /&gt;&lt;P&gt; &amp;nbsp; var strEmailContent = email.content_type +"\n"+ email.headers + "\n\n\n\n"+ email.body;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var sa = new GlideSysAttachment();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.short_description = email.subject;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.description =email.body_text;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;// map fields that are mandatory or necessary'&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;sa.write(current, email.subject +".eml", " application/octet-stream ", strEmailContent);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.insert();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;})(current, event, email, logger, classifier);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;hope this helps.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2017 18:53:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758521#M415447</guid>
      <dc:creator>sujalavemula</dc:creator>
      <dc:date>2017-03-17T18:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758522#M415448</link>
      <description>&lt;P&gt;Thanks again, Sujala!! That worked!&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I tweaked it just a small bit to ensure the Caller field was populated and the email attachment body formatted properly. Here are my final edits to Sujala's script for anyone interested.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier){&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;// Implement email action here&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var strEmailContent = email.content_type + "\n" + email.headers + "\n\n\n\n" + email.body_text;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;var sa = new GlideSysAttachment();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.caller = gs.getUserID();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.short_description = email.subject;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.description = email.body_text;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;// map fields that are mandatory or necessary'&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;sa.write(current, email.subject + ".eml", " application/octet-stream ", strEmailContent);&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;current.insert();&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;})(current, event, email, logger, classifier);&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2017 20:13:23 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758522#M415448</guid>
      <dc:creator>nathanjulo43</dc:creator>
      <dc:date>2017-03-17T20:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758523#M415449</link>
      <description>&lt;P&gt;Looks like it's including &lt;EM&gt;all&lt;/EM&gt; images in the email body as attachments, as well. Any way to have it only create the one attachment, from the attachment in the original email?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 May 2017 17:31:12 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758523#M415449</guid>
      <dc:creator>SC10</dc:creator>
      <dc:date>2017-05-09T17:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758524#M415450</link>
      <description>&lt;P&gt;Does this works for creating PDF as well?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Deepak&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 27 Jun 2017 08:09:03 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758524#M415450</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2017-06-27T08:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758525#M415451</link>
      <description>&lt;P&gt;&lt;SPAN style="color: #666666; font-family: arial, sans-serif;"&gt;I just gave this a quick try and had some success. &amp;nbsp; After the email attachment is created, I can open it in Apple Mail with no issues, but when I open it in Outlook, the message body is missing. &amp;nbsp; Just wondering if you have the same experience. &amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 01 Oct 2017 23:16:22 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758525#M415451</guid>
      <dc:creator>Shea Laughlin</dc:creator>
      <dc:date>2017-10-01T23:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758526#M415452</link>
      <description>&lt;P&gt;Can we use it together with &lt;SPAN data-sheets-userformat="{&amp;quot;2&amp;quot;:6723,&amp;quot;3&amp;quot;:[null,0],&amp;quot;4&amp;quot;:[null,2,16777215],&amp;quot;9&amp;quot;:0,&amp;quot;12&amp;quot;:0,&amp;quot;14&amp;quot;:[null,2,2698291],&amp;quot;15&amp;quot;:&amp;quot;Arial, sans-serif&amp;quot;}" data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;mobile-phone-tracker.org&amp;quot;}" style="font-size: 10pt; font-family: Arial; color: #292c33;"&gt;&lt;A title="link" class="in-cell-link" href="http://mobile-phone-tracker.org/" target="_blank"&gt;mobile-phone-tracker.org&lt;/A&gt;&lt;/SPAN&gt; mobile recorder on Android? &lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 13 Oct 2017 08:10:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758526#M415452</guid>
      <dc:creator>vondes</dc:creator>
      <dc:date>2017-10-13T08:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758527#M415453</link>
      <description>&lt;P&gt;Hi Shea,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I am facing the same issue, did you figure out to fix this?&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Vignesh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Jan 2018 16:56:32 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758527#M415453</guid>
      <dc:creator>VigneshMC</dc:creator>
      <dc:date>2018-01-02T16:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758528#M415454</link>
      <description>&lt;P&gt;Sadly, I didn't pursue it all the way through. &amp;nbsp; After getting to this point, I basically validated that it was possible to do this but didn't troubleshoot it all the way to the end.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Jan 2018 20:22:46 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758528#M415454</guid>
      <dc:creator>Shea Laughlin</dc:creator>
      <dc:date>2018-01-02T20:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758529#M415455</link>
      <description>&lt;P&gt;I've tried this, but can't get it to work. I don't get any Email Body with it. This is the .eml attachment in the INC:&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/204060iC9349F83BE74EF04/image-size/large?v=v2&amp;amp;px=999" srcset="/community/image/serverpage/image-id/204060iC9349F83BE74EF04/image-size/large?v=v2&amp;amp;px=999 1.0x" role="button" title="find_real_file.png" alt="find_real_file.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the script:&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;// Note: current.opened_by is already set to the first UserID that matches the From: email address&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; // Implement email action here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; var strEmailContent = email.content_type +"\n"+ email.headers + "\n\n\n\n"+ email.body;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; var sa = new GlideSysAttachment();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;current.caller_id = gs.getUserID();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;current.comments = "forwarded by: " + email.origemail + "\n\n" + email.body_text;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;current.short_description = email.subject;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;current.category = "O365";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;current.incident_state = IncidentState.NEW;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;current.notify = 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;current.contact_type = "email";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;if (email.body.assign != undefined)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; current.assigned_to = email.body.assign;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;if (email.body.priority != undefined)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt; current.priority = email.body.priority;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;// map fields that are mandatory or necessary'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff;"&gt;sa.write(current, email.subject +".eml", " application/octet-stream ", strEmailContent);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;current.insert();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;})(current, event, email, logger, classifier);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Can someone tell me where the error is?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Dec 2019 16:16:40 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758529#M415455</guid>
      <dc:creator>Gerry Crumbley</dc:creator>
      <dc:date>2019-12-27T16:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758530#M415456</link>
      <description>&lt;P&gt;Hi Gerry,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am facing the same issue. Were you able to fix this?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Surabhi&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 20:26:17 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/1758530#M415456</guid>
      <dc:creator>Surabhi2</dc:creator>
      <dc:date>2021-10-19T20:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/2708649#M1047221</link>
      <description>&lt;P&gt;Missing the '_text' when setting the strEmailContent&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// Note: current.opened_by is already set to the first UserID that matches the From: email address&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// Implement email action here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var strEmailContent = email.content_type +"\n"+ email.headers + "\n\n\n\n"+ email.body;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var sa = new GlideSysAttachment();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;current.caller_id = gs.getUserID();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.comments = "forwarded by: " + email.origemail + "\n\n" + email.&lt;STRONG&gt;body_text&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.short_description = email.subject;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;current.category = "O365";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.incident_state = IncidentState.NEW;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.notify = 2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.contact_type = "email";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if (email.body.assign != undefined)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.assigned_to = email.body.assign;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if (email.body.priority != undefined)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current.priority = email.body.priority;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;// map fields that are mandatory or necessary'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sa.write(current, email.subject +".eml", " application/octet-stream ", strEmailContent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;current.insert();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;})(current, event, email, logger, classifier);&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 09:09:26 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/2708649#M1047221</guid>
      <dc:creator>Z B</dc:creator>
      <dc:date>2023-10-20T09:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Inbound Email as Attachment on Call Record</title>
      <link>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/2785374#M1070230</link>
      <description>&lt;P&gt;I'm still facing the same issue. PFA for the sample email attachment. I used this code also. Kindly anyone has workaround for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Harini&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HariniDhanapal_1-1704791476556.png" style="width: 400px;"&gt;&lt;img src="https://www.servicenow.com/community/image/serverpage/image-id/319354i67F09574AE53B7AD/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" srcset="/community/image/serverpage/image-id/319354i67F09574AE53B7AD/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400 1.0x, /community/image/serverpage/image-id/319354i67F09574AE53B7AD/image-dimensions/800x623/is-moderation-mode/true?v=v2 2.0x, /community/image/serverpage/image-id/319354i67F09574AE53B7AD/image-dimensions/1200x935/is-moderation-mode/true?v=v2 3.0x" role="button" title="HariniDhanapal_1-1704791476556.png" alt="HariniDhanapal_1-1704791476556.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 09:11:27 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/inbound-email-as-attachment-on-call-record/m-p/2785374#M1070230</guid>
      <dc:creator>Harini Dhanapal</dc:creator>
      <dc:date>2024-01-09T09:11:27Z</dc:date>
    </item>
  </channel>
</rss>

