<?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: setting up recipe for looping through items with individual api authorizations in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6622#M2877</link>
    <description>&lt;P&gt;This is all possible to do, but the complexity of your recipes depends on how securely you want to manage the API keys. Task efficiency is also important, but it's not worth discussing until security requirements are understood.&lt;/P&gt;&lt;P&gt;Here are Workato's best practices for sensitive data. In my opinion, following these can often overcomplicate recipe creation, especially in your situation where you need to hot swap API keys:&amp;nbsp;&lt;A href="https://docs.workato.com/recipes/recipe-security.html#handling-sensitive-data" target="_blank"&gt;https://docs.workato.com/recipes/recipe-security.html#handling-sensitive-data&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The easiest way to store a key in an environment or project property, but this is also &lt;STRONG&gt;least secure&lt;/STRONG&gt; because the job logs do not obfuscate the value unless you manually turn on job masking (which IMO vastly limits troubleshooting). If security is paramount, then this approach &lt;STRONG&gt;should not be used.&lt;/STRONG&gt; If security is flexible, then this might be the way to go (but still not recommended).&lt;/P&gt;&lt;P&gt;The same security disadvantage applies to any other key storage method (properties, LUTs, etc.)&amp;nbsp;&lt;EM&gt;except&amp;nbsp;&lt;/EM&gt;storing the key as part of the HTTP connection (this is the recommended method). However, this is where things can get more complicated because swapping out the HTTP connection requires some additional framework.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you need to securely store your keys, here's how I would approach building the workflow using two recipes and a lookup table:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Assume you need to call 10 properties with 10 tills each -- 100 unique key combinations&lt;/LI&gt;&lt;LI&gt;To make a secure API call using the HTTP connector (following best practices), you need to create an HTTP action connection for &lt;STRONG&gt;every&lt;/STRONG&gt; unique key combination&lt;/LI&gt;&lt;LI&gt;You then need to make a lookup table mapping your HTTP connections by ID to each property/till combination&lt;/LI&gt;&lt;LI&gt;Next you make a function recipe that makes your API call using an HTTP action. In the recipe, you need to configure the settings to allow "Runtime user connections" on the HTTP action. This will allow you to swap out the HTTP connection value when you call this function from the next recipe&lt;/LI&gt;&lt;LI&gt;Lastly, you make an outer/controller recipe to kick off your process. You start by getting the LUT of HTTP connections, then looping through each entry, calling your API function&amp;nbsp;&lt;STRONG&gt;and&lt;/STRONG&gt; swapping out the connection using the HTTP connection ID lookup&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope this helps. You said you're a newbie, so let me know if some (or all) of this doesn't make sense! : )&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2024 18:03:31 GMT</pubDate>
    <dc:creator>gary1</dc:creator>
    <dc:date>2024-05-06T18:03:31Z</dc:date>
    <item>
      <title>setting up recipe for looping through items with individual api authorizations</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6619#M2875</link>
      <description>&lt;P&gt;Workato newbie here, I'm wondering how to migrate an existing coded workflow to workato.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I loop through a data structure of buildings each with their own api key, and each building has 1 or more tills, each with their own api key for a different cloud service&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;data&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'property1'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"ID"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'someGUID'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"propertyapikey"&lt;/SPAN&gt;&lt;SPAN&gt;:keyring.get_password(&lt;/SPAN&gt;&lt;SPAN&gt;'property1'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'property1key'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"tills"&lt;/SPAN&gt;&lt;SPAN&gt;: [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"till1"&lt;/SPAN&gt;&lt;SPAN&gt;: keyring.get_password(&lt;/SPAN&gt;&lt;SPAN&gt;'till1'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'till1key'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"till2"&lt;/SPAN&gt;&lt;SPAN&gt;: keyring.get_password(&lt;/SPAN&gt;&lt;SPAN&gt;'till2'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'till2key'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'property2'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"ID"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;'someGUID'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"propertyapikey"&lt;/SPAN&gt;&lt;SPAN&gt;:keyring.get_password(&lt;/SPAN&gt;&lt;SPAN&gt;'property2'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'property2key'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"tills"&lt;/SPAN&gt;&lt;SPAN&gt;: [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"till1"&lt;/SPAN&gt;&lt;SPAN&gt;: keyring.get_password(&lt;/SPAN&gt;&lt;SPAN&gt;'till1'&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'till1key'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I'm wondering the best way to approach this in workato with storing api keys somewhere, plus my data structure of things to loop through. The lookup table or project settings seem to be simple key value pairs. I could begin my recipe with this data structure defined in the output of a python script, but then all my keys are plain text.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 04:57:07 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6619#M2875</guid>
      <dc:creator>rm135</dc:creator>
      <dc:date>2024-05-06T04:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: setting up recipe for looping through items with individual api authorizations</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6622#M2877</link>
      <description>&lt;P&gt;This is all possible to do, but the complexity of your recipes depends on how securely you want to manage the API keys. Task efficiency is also important, but it's not worth discussing until security requirements are understood.&lt;/P&gt;&lt;P&gt;Here are Workato's best practices for sensitive data. In my opinion, following these can often overcomplicate recipe creation, especially in your situation where you need to hot swap API keys:&amp;nbsp;&lt;A href="https://docs.workato.com/recipes/recipe-security.html#handling-sensitive-data" target="_blank"&gt;https://docs.workato.com/recipes/recipe-security.html#handling-sensitive-data&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The easiest way to store a key in an environment or project property, but this is also &lt;STRONG&gt;least secure&lt;/STRONG&gt; because the job logs do not obfuscate the value unless you manually turn on job masking (which IMO vastly limits troubleshooting). If security is paramount, then this approach &lt;STRONG&gt;should not be used.&lt;/STRONG&gt; If security is flexible, then this might be the way to go (but still not recommended).&lt;/P&gt;&lt;P&gt;The same security disadvantage applies to any other key storage method (properties, LUTs, etc.)&amp;nbsp;&lt;EM&gt;except&amp;nbsp;&lt;/EM&gt;storing the key as part of the HTTP connection (this is the recommended method). However, this is where things can get more complicated because swapping out the HTTP connection requires some additional framework.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you need to securely store your keys, here's how I would approach building the workflow using two recipes and a lookup table:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Assume you need to call 10 properties with 10 tills each -- 100 unique key combinations&lt;/LI&gt;&lt;LI&gt;To make a secure API call using the HTTP connector (following best practices), you need to create an HTTP action connection for &lt;STRONG&gt;every&lt;/STRONG&gt; unique key combination&lt;/LI&gt;&lt;LI&gt;You then need to make a lookup table mapping your HTTP connections by ID to each property/till combination&lt;/LI&gt;&lt;LI&gt;Next you make a function recipe that makes your API call using an HTTP action. In the recipe, you need to configure the settings to allow "Runtime user connections" on the HTTP action. This will allow you to swap out the HTTP connection value when you call this function from the next recipe&lt;/LI&gt;&lt;LI&gt;Lastly, you make an outer/controller recipe to kick off your process. You start by getting the LUT of HTTP connections, then looping through each entry, calling your API function&amp;nbsp;&lt;STRONG&gt;and&lt;/STRONG&gt; swapping out the connection using the HTTP connection ID lookup&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I hope this helps. You said you're a newbie, so let me know if some (or all) of this doesn't make sense! : )&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 18:03:31 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6622#M2877</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-05-06T18:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: setting up recipe for looping through items with individual api authorizations</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6623#M2878</link>
      <description>&lt;P&gt;great! runtime user connections on the http actions is a great tip. I'll try that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to store the initial data structure of [{properties, propertyID, httpActionID, [{tillid,tillHttpActionID..]}...] ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not a flat table data structure given the variable amount of till objects per property. I'm thinking I could create two tables of properties and tills and use the workato sql collection to do a sql join? any other ways?&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 22:21:45 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6623#M2878</guid>
      <dc:creator>rm135</dc:creator>
      <dc:date>2024-05-06T22:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: setting up recipe for looping through items with individual api authorizations</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6624#M2879</link>
      <description>&lt;P&gt;There's no way to "securely" store the data structure as is, so I would convert it to a flat table. Keep in mind I have no idea what other input your API call needs, so I'm focusing just on the basic orchestration and key management.&lt;/P&gt;&lt;P&gt;Here's my take on the lookup table:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;lut_key&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;property_name&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;property_guid&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%"&gt;&lt;STRONG&gt;http_connection_id&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;property1_till1&lt;/TD&gt;&lt;TD width="25%"&gt;property1&lt;/TD&gt;&lt;TD width="25%"&gt;111-222-333&lt;/TD&gt;&lt;TD width="25%"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;property1_till2&lt;/TD&gt;&lt;TD&gt;property1&lt;/TD&gt;&lt;TD&gt;111-222-333&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;property2_till1&lt;/TD&gt;&lt;TD&gt;property2&lt;/TD&gt;&lt;TD&gt;222-333-444&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;The keys will get securely stored in the connections, and each connection will have an ID (created by Workato). When iterating through your list of property-tills, you'll have to look up the HTTP connection ID and pass that into the recipe making the API call.&lt;/P&gt;&lt;P&gt;Here's what I don't know that probably has a big impact on the approach:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;How do you know which properties/tills to call? Do you always call all of them, or only call some of them?&lt;/LI&gt;&lt;LI&gt;What other data needs to be passed to the API, and how is that structured? Does it include something that could be used to deterministically map to the lut_key in the above, or otherwise tell you "&lt;EM&gt;this&amp;nbsp;&lt;/EM&gt;data is for&amp;nbsp;&lt;EM&gt;this&amp;nbsp;&lt;/EM&gt;property and till"?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 22:38:18 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6624#M2879</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2024-05-06T22:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: setting up recipe for looping through items with individual api authorizations</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6625#M2880</link>
      <description>&lt;P&gt;Luckily I always call all properties/tills and the authentication is the only thing that changes between API calls.&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks this has been super helpful&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2024 22:58:52 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/setting-up-recipe-for-looping-through-items-with-individual-api/m-p/6625#M2880</guid>
      <dc:creator>rm135</dc:creator>
      <dc:date>2024-05-06T22:58:52Z</dc:date>
    </item>
  </channel>
</rss>

