<?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 Passing Dynamic Name:Value pairs when making a Custom Action API call in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12232#M4691</link>
    <description>&lt;P&gt;I'm making a Custom Action API call to a target system (Maxio).&lt;/P&gt;&lt;P&gt;As part of this, I need to be able to pass two dynamically generated arrays of name:value pairs each time - one contains a list of restricted_products and the other a list of restricted_components.&lt;/P&gt;&lt;P&gt;When using the Guided Setup and supplying sample JSON for the Request Body like this...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSON Restriction Grab.jpg" style="width: 636px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2695i32B29E2258484475/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="JSON Restriction Grab.jpg" alt="JSON Restriction Grab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;... Workato correctly passes the data onto the Target system which takes the necessary action.&amp;nbsp; So I know the JSON being passed in the intial setup is correct.&lt;/P&gt;&lt;P&gt;But then when I inspect the resulting Custom Action step in my Recipe, Workato has decided that the constituent product and component items which make up each of the arrays are fixed values.&amp;nbsp; The Request Body Parameters portion of the action looks like this...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Params.jpg" style="width: 274px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2696i399C595CF47D4CB8/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Params.jpg" alt="Params.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the number and names of each product and component will vary each time.&lt;/P&gt;&lt;P&gt;How do I tell Workato that restricted_products are restricted_components are dynamic arrays, and pass in appropriate values?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2026 15:34:18 GMT</pubDate>
    <dc:creator>RussellJ</dc:creator>
    <dc:date>2026-05-20T15:34:18Z</dc:date>
    <item>
      <title>Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12232#M4691</link>
      <description>&lt;P&gt;I'm making a Custom Action API call to a target system (Maxio).&lt;/P&gt;&lt;P&gt;As part of this, I need to be able to pass two dynamically generated arrays of name:value pairs each time - one contains a list of restricted_products and the other a list of restricted_components.&lt;/P&gt;&lt;P&gt;When using the Guided Setup and supplying sample JSON for the Request Body like this...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSON Restriction Grab.jpg" style="width: 636px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2695i32B29E2258484475/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="JSON Restriction Grab.jpg" alt="JSON Restriction Grab.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;... Workato correctly passes the data onto the Target system which takes the necessary action.&amp;nbsp; So I know the JSON being passed in the intial setup is correct.&lt;/P&gt;&lt;P&gt;But then when I inspect the resulting Custom Action step in my Recipe, Workato has decided that the constituent product and component items which make up each of the arrays are fixed values.&amp;nbsp; The Request Body Parameters portion of the action looks like this...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Params.jpg" style="width: 274px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2696i399C595CF47D4CB8/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Params.jpg" alt="Params.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the number and names of each product and component will vary each time.&lt;/P&gt;&lt;P&gt;How do I tell Workato that restricted_products are restricted_components are dynamic arrays, and pass in appropriate values?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 15:34:18 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12232#M4691</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-20T15:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12233#M4692</link>
      <description>&lt;P&gt;I wrote a response and lost it somehow, so lets try this again:&lt;/P&gt;&lt;P&gt;First off, these are objects (hashes), not arrays!&lt;/P&gt;&lt;P&gt;When you have dynamic object content (meaning you may potentially have different keys in every instance of the same object), you can't pre-define them using object definitions because they don't have a standard definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The easiest way to do what you need is to set the root objects (restricted_components and restricted_objects) to strings and feed them the constructed object contents via formula. When doing this they will behave as objects despite being defined as a strings. You can test this out in a normal variable to see what I mean.&lt;/P&gt;&lt;P&gt;However, there's a more important consideration: you're making a custom connector where the input to the connector is restricted to the expected input format of the API. That's kind of missing the point and not using the connector to its full potential.&lt;/P&gt;&lt;P&gt;Instead, you can pass the data into the connector in whatever format you want and let the connector construct the API call internally.&lt;/P&gt;&lt;P&gt;So instead of requiring input like this to match the API call:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "restricted_products": {
    "key1": "value1",
    "key2": "value2",
    "key3": "value3"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;You can pass a standard list (array) variable of key/value pairs like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "restricted_products": [
    {
      "key": "key1",
      "value": "value1"
    },
    {
      "key": "key2",
      "value": "value2"
    },
    {
      "key": "key3",
      "value": "value3"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;Inside the connector, it's a cake walk to iterate the list and construct the API format.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 17:05:05 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12233#M4692</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-05-20T17:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12235#M4693</link>
      <description>&lt;P&gt;Hi Gary&lt;/P&gt;&lt;P&gt;Thanks for your reply, although whilst I understood each of your words individually, I'm still not sure how to proceed&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":pensive_face:"&gt;😔&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Setting the root objects to strings and feeding them constructed objects for Workato to take care of sounds great.&amp;nbsp; But could you give me a pointer as to how to do that?&amp;nbsp; I’m starting from a comma separated string of values for both restricted_components and restricted_products .&amp;nbsp; I guess the bit I’m missing is “how to convert a comma separated string into objects”.&lt;/P&gt;&lt;P&gt;Secondly (and this might be key to my confusion), I don’t follow your statement “you’re making a custom connector”.&amp;nbsp; I’m not building a customer connector, but just using the OOTB Maxio Connector and using the Guided Setup to build a Custom *Action* (using a sample request)...?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Custom Action1.jpg" style="width: 977px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2697i7E16439428B8C988/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Custom Action1.jpg" alt="Custom Action1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So whilst I’m sure you’re making a valuable point about passing “the data into the connector in whatever format you want and let the connector construct the API call internally” I think you may be assuming too much about where I’m starting from?&lt;/P&gt;&lt;P&gt;Apologise for the noob questions!&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 18:03:25 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12235#M4693</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-20T18:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12236#M4694</link>
      <description>&lt;P&gt;Ah, my bad! My eyes read "custom action" and my brain said "custom connector, got it."&lt;/P&gt;&lt;P&gt;So the real question is "how do you create the formatted payload from a comma delimited string, and &lt;EM&gt;then&lt;/EM&gt; plug it into the custom action?"&lt;/P&gt;&lt;P&gt;To answer that... I would need to see the string! Can you share an example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 19:48:50 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12236#M4694</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-05-20T19:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12237#M4695</link>
      <description>&lt;P&gt;Huzzah! I think we’re on the same page.&lt;/P&gt;&lt;P&gt;The strings will just literally be of the format “product1,product2” and “component1,component2,component3”.&lt;/P&gt;&lt;P&gt;They’ll each need a “handle:” prefix and a value of true but I’m sure I could whizz up a tiny JS block (after your assistance on my last post) to turn that into objecty format.&lt;/P&gt;&lt;P&gt;The biggest mystery is how to configure the fields in the custom action.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 20:13:52 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12237#M4695</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-20T20:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12240#M4696</link>
      <description>&lt;P&gt;Yeah, that's really your best bet. Take the string, reformat it into the object, pass the object as formula into restricted_components/products. Workato data pills rely on having pre-defined key name, so when your key names are dynamic you have to go with a more complex solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 21:20:53 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12240#M4696</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-05-20T21:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Passing Dynamic Name:Value pairs when making a Custom Action API call</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12255#M4697</link>
      <description>&lt;P&gt;I'm tantalisingly close... but still missing something&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":persevering_face:"&gt;😣&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My recipe is effectively just two blocks - one with the JS and another to execute the Custom Action.&lt;/P&gt;&lt;P&gt;The JS block takes a "list" input field which contains the comma separated list. The JS (thanks ChatGPT) turns the list into a suitably formatted object which is output in the "myJSON" field...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grab1.jpg" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2707i8AD1A41DF54519DB/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="grab1.jpg" alt="grab1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's the code for reference...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grab2.0.jpg" style="width: 705px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2708i8EB0603D77405089/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="grab2.0.jpg" alt="grab2.0.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The myJSON output is then slotted into the custom action block like so...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grab3.jpg" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2709iB044FDCB891CB1DC/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="grab3.jpg" alt="grab3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think the only problem is that, when run, the name and values (e.g. handle:component1) are not "quoted".&amp;nbsp; Here's the result of running the job...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="grab4.jpg" style="width: 999px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2710i1C6204D61791C3B6/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="grab4.jpg" alt="grab4.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Whilst the target system (Maxio) does not choke on this, it also doesn't do what I want, so think it's just ignoring it.&lt;/P&gt;&lt;P&gt;Feels like I'm missing something very basic!&lt;/P&gt;</description>
      <pubDate>Thu, 21 May 2026 11:31:03 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/passing-dynamic-name-value-pairs-when-making-a-custom-action-api/m-p/12255#M4697</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-21T11:31:03Z</dc:date>
    </item>
  </channel>
</rss>

