<?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: Data transformation using Javascript Connector in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/8041#M3370</link>
    <description>&lt;P&gt;&amp;nbsp;i also create a recipe for data transformation using JS snippet by workato, in this recipe i have a group of JSON object and i'm doing data transformation like converting firstName, lastName etc&amp;nbsp; to - (based on requirement) using JS code.&lt;/P&gt;&lt;P&gt;Recipe:-&amp;nbsp;&amp;nbsp;&lt;A title="Data Tranformation using JS Snippet By Workato" href="https://app.workato.com/recipes/54842488?st=22358e2f16126f8b0aa51e349ae0de7633781b47a307c56fdd951d59b420d568" target="_self"&gt;https://app.workato.com/recipes/54842488?st=22358e2f16126f8b0aa51e349ae0de7633781b47a307c56fdd951d59b420d568&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Oct 2024 05:42:22 GMT</pubDate>
    <dc:creator>Patel0786</dc:creator>
    <dc:date>2024-10-17T05:42:22Z</dc:date>
    <item>
      <title>Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3317#M1597</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I'm currently trying to do some data transformation using the Javascript connector but I can't figure out how to corrrectly configure the output.  I'm trying to format a JSON body for a HTTP request to the Slack chat.scduleMessage endpoint.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;In my recipe I set a variable to a JSON string, which I need to input into the Javascript connector, I then use JSON.parse to parse this string, but when I return the JSON.stringify on the next line, it ends up as a null value... My output schema is just a string named payload and in the next step the payload datapill is an empty string.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The JSON.parse does not give me an error so I have to assume the string gets parsed, but somehow, somewhere it ends up as null.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;Does anyone have any experience in this situation?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 17:37:19 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3317#M1597</guid>
      <dc:creator>jani-swinnen</dc:creator>
      <dc:date>2022-08-23T17:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3318#M1598</link>
      <description>&lt;P&gt;I just ran a quick test and was able to get JSON.parse and JSON.stringify to work without issue. It might be how your script is returning the output. I found that part a bit tricky when first working with the JS connector.&lt;/P&gt;
&lt;P&gt;I attached some images of my setup and script so you can see how it works and hopefully replicate it.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_connector.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/187i792278E75C04CC06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_connector.png" alt="js_connector.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_log.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/188iE5F3D1477253B1BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_log.png" alt="js_log.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;  &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_output.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/189iEF8CBE5EDA80692A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_output.png" alt="js_output.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 13:53:34 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3318#M1598</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2023-02-08T13:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3320#M1600</link>
      <description>&lt;P&gt;Thank you Gary,&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;I managed to figure it out with the help of your screenshots.&lt;/P&gt;&lt;BR /&gt;&lt;P&gt;The problem was that I changed the syntax when trying to fix a previous bug, and in doing so I removed the curly braces surrounding the input and return values. I think that's the main reason for my function to return a null value.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 17:44:30 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3320#M1600</guid>
      <dc:creator>jani-swinnen</dc:creator>
      <dc:date>2022-08-24T17:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3816#M1766</link>
      <description>&lt;P&gt;Hello Gary,&lt;/P&gt;&lt;P&gt;I am Jagadeesh. I am working on the same Usecase that Jani was explaining. I wanted to refer to your setup and Script but I couldn't find the attached images. Could you please share them once again?&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 05:46:35 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3816#M1766</guid>
      <dc:creator>Saichand</dc:creator>
      <dc:date>2023-02-08T05:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3825#M1768</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://systematic.workato.com/t5/user/viewprofilepage/user-id/8859"&gt;@Saichand&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have updated Gary's replies with the original screenshots of his solution. I have also attached them to this reply (see below).&lt;/P&gt;
&lt;P&gt;Thank you,&lt;BR /&gt;Meghan&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_connector.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/190iE65A04824641FDDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_connector.png" alt="js_connector.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_log.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/191i1B59D2B003E108AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_log.png" alt="js_log.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="js_output.png" style="width: 400px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/192i0DD472219B3CFB21/image-size/medium?v=v2&amp;amp;px=400" role="button" title="js_output.png" alt="js_output.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Wed, 08 Feb 2023 13:55:22 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/3825#M1768</guid>
      <dc:creator>meghan-legaspi</dc:creator>
      <dc:date>2023-02-08T13:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Data transformation using Javascript Connector</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/8041#M3370</link>
      <description>&lt;P&gt;&amp;nbsp;i also create a recipe for data transformation using JS snippet by workato, in this recipe i have a group of JSON object and i'm doing data transformation like converting firstName, lastName etc&amp;nbsp; to - (based on requirement) using JS code.&lt;/P&gt;&lt;P&gt;Recipe:-&amp;nbsp;&amp;nbsp;&lt;A title="Data Tranformation using JS Snippet By Workato" href="https://app.workato.com/recipes/54842488?st=22358e2f16126f8b0aa51e349ae0de7633781b47a307c56fdd951d59b420d568" target="_self"&gt;https://app.workato.com/recipes/54842488?st=22358e2f16126f8b0aa51e349ae0de7633781b47a307c56fdd951d59b420d568&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 05:42:22 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/data-transformation-using-javascript-connector/m-p/8041#M3370</guid>
      <dc:creator>Patel0786</dc:creator>
      <dc:date>2024-10-17T05:42:22Z</dc:date>
    </item>
  </channel>
</rss>

