<?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: Using dynamic names in lists in playbooks in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588894#M3374</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1022065011"&gt;@bowesmana&lt;/a&gt;, I've attached a short playbook that should work for your requirement. We have an automation called &lt;STRONG&gt;TimeComponent&lt;/STRONG&gt; that will work better.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-06 at 12.50.44 PM.png" style="width: 363px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/60205i2D65707AB1B7C2A3/image-dimensions/363x530?v=v2" width="363" height="530" role="button" title="Screenshot 2024-06-06 at 12.50.44 PM.png" alt="Screenshot 2024-06-06 at 12.50.44 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my example, I've created the error path feature instead of a conditional check. I think you might be able to use the playbook as-is, ensure that you replace the "Make some API call.." step with the actual steps for fetch the remote data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Note: Just rename the attached file from .xml to .yml.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jun 2024 02:55:33 GMT</pubDate>
    <dc:creator>jfernandes1</dc:creator>
    <dc:date>2024-06-06T02:55:33Z</dc:date>
    <item>
      <title>Using dynamic names in lists in playbooks</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588881#M3372</link>
      <description>&lt;P&gt;I have a sub-playbook that checks if a list exists and if not, fetches data from an external API and saves the result to that list, the next time the playbook runs it will load it from the list rather than fetching from the external API.&lt;/P&gt;
&lt;P&gt;I want this list to be named based on the current month, but am unable to make this work as it seems I need nested variables, which require a custom script.&lt;/P&gt;
&lt;P&gt;My current task list is (abbreviated to relevant ones)&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Conditional task with IsListExist automation with a text name for the list bla_bla_bla. I am assuming I can make this ${list_name}&lt;/LI&gt;
&lt;LI&gt;Task with Set automation that has the value&amp;nbsp;${lists.bla_bla_bla}&lt;/LI&gt;
&lt;LI&gt;Finally createList builtin that uses the bla_bla_bla list name&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So the challenge is to solve the middle task that uses the Set with ${lists.xxx}, where xxx needs to be dynamic.&lt;/P&gt;
&lt;P&gt;Is there a way to solve this or is there an alternative way - I did originally try getList, but this seems to create a File in the context, but whose contents was some 500 error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 00:05:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588881#M3372</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-06-06T00:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic names in lists in playbooks</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588894#M3374</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1022065011"&gt;@bowesmana&lt;/a&gt;, I've attached a short playbook that should work for your requirement. We have an automation called &lt;STRONG&gt;TimeComponent&lt;/STRONG&gt; that will work better.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-06-06 at 12.50.44 PM.png" style="width: 363px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/60205i2D65707AB1B7C2A3/image-dimensions/363x530?v=v2" width="363" height="530" role="button" title="Screenshot 2024-06-06 at 12.50.44 PM.png" alt="Screenshot 2024-06-06 at 12.50.44 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my example, I've created the error path feature instead of a conditional check. I think you might be able to use the playbook as-is, ensure that you replace the "Make some API call.." step with the actual steps for fetch the remote data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Note: Just rename the attached file from .xml to .yml.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 02:55:33 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588894#M3374</guid>
      <dc:creator>jfernandes1</dc:creator>
      <dc:date>2024-06-06T02:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic names in lists in playbooks</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588910#M3375</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/208028"&gt;@jfernandes1&lt;/a&gt;&amp;nbsp;- something I don't get (I'm a real newbie) is having done getList and the list is loaded, where does the list data actually go? If I turn of quiet mode, I can see the data logged, but I can't see it in the context of the playbook, so how do I actually use it?&amp;nbsp; I think that was why I went down the ${lists.xxx} logic as I could put that in a Set automation and get the data into the context - with this method above, after the getList builtin runs, I don't have the data anywhere I can see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 07:31:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/588910#M3375</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-06-06T07:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using dynamic names in lists in playbooks</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/589038#M3382</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1022065011"&gt;@bowesmana&lt;/a&gt;, by default nothing is written to context. You can keep quite mode enable and add the below to the advanced tab.&amp;nbsp;&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="Screenshot 2024-06-07 at 1.13.14 PM.png" style="width: 477px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/60251i5067834F163CAE92/image-dimensions/477x103?v=v2" width="477" height="103" role="button" title="Screenshot 2024-06-07 at 1.13.14 PM.png" alt="Screenshot 2024-06-07 at 1.13.14 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do not add anything after the equal sign (=). The syntax tells XSOAR to grab all output and add it to the &lt;STRONG&gt;listdata&lt;/STRONG&gt;&amp;nbsp;key.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also like to recommend that you have a separate step for the &lt;STRONG&gt;getList&lt;/STRONG&gt; command that saves the data to the context. Before you start adding more data to context, I would suggest that you only do so:-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- When you cannot use &lt;STRONG&gt;CompareList&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;FilterByList&lt;/STRONG&gt; commands&lt;/P&gt;
&lt;P&gt;&amp;nbsp;- When you cannot use a conditional playbook task with the &lt;STRONG&gt;In&lt;/STRONG&gt;, &lt;STRONG&gt;Not In&lt;/STRONG&gt;, &lt;STRONG&gt;In&lt;/STRONG&gt; &lt;STRONG&gt;List&lt;/STRONG&gt;&amp;nbsp;or &lt;STRONG&gt;Not&lt;/STRONG&gt; &lt;STRONG&gt;in&lt;/STRONG&gt; &lt;STRONG&gt;List&lt;/STRONG&gt;&amp;nbsp;operators.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 03:28:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/using-dynamic-names-in-lists-in-playbooks/m-p/589038#M3382</guid>
      <dc:creator>jfernandes1</dc:creator>
      <dc:date>2024-06-07T03:28:13Z</dc:date>
    </item>
  </channel>
</rss>

