<?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>topic Re: Possible to format JSON in Logger or Email? in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5773#M2530</link>
    <description>&lt;P&gt;It's working now,&amp;nbsp; thank you!&lt;/P&gt;&lt;P&gt;Realized,&amp;nbsp; from the "Send Request via HTTP" action I needed to pass through the "Response" datapill and not the "Body" containing the "Response"&lt;/P&gt;</description>
    <pubDate>Mon, 04 Dec 2023 23:21:49 GMT</pubDate>
    <dc:creator>gsbrown</dc:creator>
    <dc:date>2023-12-04T23:21:49Z</dc:date>
    <item>
      <title>Possible to format JSON in Logger or Email?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5760#M2526</link>
      <description>&lt;P&gt;I have a recipe with an HTTP Request action with monitor error handling to logger and email.&amp;nbsp; &amp;nbsp;I can attach the HTTP Response "Body" field into the logger and email,&amp;nbsp; but is there a way to apply JSON formatting to it so it's easier to read?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 20:28:12 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5760#M2526</guid>
      <dc:creator>gsbrown</dc:creator>
      <dc:date>2023-12-04T20:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to format JSON in Logger or Email?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5767#M2527</link>
      <description>&lt;P&gt;You can do this with a quick JavaScript action.&lt;/P&gt;&lt;P&gt;Create one with an input and output like this. Replace the message data pill with your HTTP response:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_1-1701726931127.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/898i383C3E7F6528F5C5/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_1-1701726931127.png" alt="gary1_1-1701726931127.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use this code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;exports.main = async ({ obj }) =&amp;gt; {
  var pretty = JSON.stringify(obj, null, "\t");
  return { pretty };
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the "pretty" output pill as-is in a plaintext email to get this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_3-1701727076625.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/900i2D256DA3D968B54A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_3-1701727076625.png" alt="gary1_3-1701727076625.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to use it in an HTML email, use "pre" like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_4-1701727111306.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/901iCFDA78688C3E0A58/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_4-1701727111306.png" alt="gary1_4-1701727111306.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Emails like this in monospace font:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_5-1701727133072.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/902i60A5A65BEDB0792A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_5-1701727133072.png" alt="gary1_5-1701727133072.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 22:01:01 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5767#M2527</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-12-04T22:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to format JSON in Logger or Email?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5770#M2529</link>
      <description>&lt;P&gt;I see some encoding problems in the input (it's passing as a string instead of an object).&lt;/P&gt;&lt;P&gt;Is the input field set to formula mode or text mode? Make sure it's formula. This might fix it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gary1_0-1701731167417.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/903iA381271048E127FA/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gary1_0-1701731167417.png" alt="gary1_0-1701731167417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 23:10:10 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5770#M2529</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-12-04T23:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to format JSON in Logger or Email?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5773#M2530</link>
      <description>&lt;P&gt;It's working now,&amp;nbsp; thank you!&lt;/P&gt;&lt;P&gt;Realized,&amp;nbsp; from the "Send Request via HTTP" action I needed to pass through the "Response" datapill and not the "Body" containing the "Response"&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 23:21:49 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5773#M2530</guid>
      <dc:creator>gsbrown</dc:creator>
      <dc:date>2023-12-04T23:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to format JSON in Logger or Email?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5774#M2531</link>
      <description>&lt;P&gt;Excellent, that would have been my follow up suggestion! The "body" is encoded as a string, but the parsed response gets passed as an object.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2023 23:45:35 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/possible-to-format-json-in-logger-or-email/m-p/5774#M2531</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-12-04T23:45:35Z</dc:date>
    </item>
  </channel>
</rss>

