<?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: How to work on File Content collected from Azure blob in Playbook in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228741#M4036</link>
    <description>&lt;P&gt;Thanks &lt;SPAN class="UserName lia-user-name lia-user-rank-L0-Member lia-component-message-view-widget-author-username"&gt;&lt;A id="link_18" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/78092095" target="_self" aria-label="View Profile of mbgonzalez"&gt;&lt;SPAN class=""&gt;mbgonzalez&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt; for your reply,&lt;/P&gt;
&lt;P&gt;I couldn't see from script input a way to append or edit the file content, however, I overcome this phase by extracting the IOCs I need from the file, and set it in a context Variable, then I am creating a file, and lastly updating the blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I am facing now is that, the automation script I use to create the file "FilecreateandUploadV2" is looping over the entries of extracted Indicators, and creating file for each, I tried to tune the input with transformers, but no actual help on that, except with stringfy, but this breaks the list format, which is important for the blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate if anyone has a clue, how to make the file create script to take all the entries and append it to the file as list.&lt;/P&gt;</description>
    <pubDate>Sun, 11 May 2025 14:53:04 GMT</pubDate>
    <dc:creator>xdrengineer</dc:creator>
    <dc:date>2025-05-11T14:53:04Z</dc:date>
    <item>
      <title>How to work on File Content collected from Azure blob in Playbook</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228392#M4006</link>
      <description>&lt;P&gt;I am working on Playbook, where I need to update the content of Azure storage blob.&lt;/P&gt;
&lt;P&gt;I have used the integration with Azure storage container, and I am able to get the file, but I am getting the file metadata only on PB context, and I see that the file itself added to the incident.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, no direct access to the file content to edit/add/remove.&lt;/P&gt;
&lt;P&gt;I see only an option to download the file manually from incident UI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to make this edit from the PB itself, and then I can update the blob again with the new edited file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That the integration's doc for the connector I am using, &lt;A href="https://xsoar.pan.dev/docs/reference/integrations/azure-storage-container#azure-storage-container-blob-get" target="_blank"&gt;https://xsoar.pan.dev/docs/reference/integrations/azure-storage-container#azure-storage-container-blob-get&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By @Enes Ozdemir.&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 13:59:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228392#M4006</guid>
      <dc:creator>xdrengineer</dc:creator>
      <dc:date>2025-05-07T13:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on File Content collected from Azure blob in Playbook</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228456#M4011</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The file has to be in the Warroom, downloaded from somewhere like !getfile or something like that. You can use the command !ReadFile, and enter the "EntryID" of the file. I do it the same as you with a list of IPs but from GCS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 05:34:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228456#M4011</guid>
      <dc:creator>mbgonzalez</dc:creator>
      <dc:date>2025-05-08T05:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on File Content collected from Azure blob in Playbook</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228741#M4036</link>
      <description>&lt;P&gt;Thanks &lt;SPAN class="UserName lia-user-name lia-user-rank-L0-Member lia-component-message-view-widget-author-username"&gt;&lt;A id="link_18" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/78092095" target="_self" aria-label="View Profile of mbgonzalez"&gt;&lt;SPAN class=""&gt;mbgonzalez&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt; for your reply,&lt;/P&gt;
&lt;P&gt;I couldn't see from script input a way to append or edit the file content, however, I overcome this phase by extracting the IOCs I need from the file, and set it in a context Variable, then I am creating a file, and lastly updating the blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue I am facing now is that, the automation script I use to create the file "FilecreateandUploadV2" is looping over the entries of extracted Indicators, and creating file for each, I tried to tune the input with transformers, but no actual help on that, except with stringfy, but this breaks the list format, which is important for the blob.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate if anyone has a clue, how to make the file create script to take all the entries and append it to the file as list.&lt;/P&gt;</description>
      <pubDate>Sun, 11 May 2025 14:53:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228741#M4036</guid>
      <dc:creator>xdrengineer</dc:creator>
      <dc:date>2025-05-11T14:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on File Content collected from Azure blob in Playbook</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228755#M4037</link>
      <description>&lt;P&gt;I think you're facing the same issues as I did. I stringify the whole array, so the list shows like this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mbgonzalez_2-1747020234031.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/67526iEE7D127981089E31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mbgonzalez_2-1747020234031.png" alt="mbgonzalez_2-1747020234031.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then I made an automation that transforms from this "stringified array" to a "line break list", that is the format expected for the external platform to be consumed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;'''
Este script transforma una string que antes era un array a un string con salto de linea de cada elemento:
from: [‘1’,‘2’,‘n’, …]
to:
1
2
n
…

- Para utilizar este script se deben agregar 2 argumentos: input_key y output_key.
- input_key es un array transformado a string, para eso se puede usar el automation "Stringify"

autor:
'''

input_key = demisto.args().get('input_key')
output_key = demisto.args().get('output_key')

raw_string = demisto.get(demisto.context(), input_key)

if not raw_string:
    return_error(f"No se encontró valor en el contexto para la key '{input_key}'.")

try:
    ip_list = json.loads(raw_string)
    if not isinstance(ip_list, list):
        return_error(f"El valor en '{input_key}' no es una lista válida.")
except Exception as e:
    return_error(f"Error al parsear string como lista JSON: {e}")

ip_output = '\n'.join(ip_list)

demisto.setContext(output_key, ip_output)
return_results(f"Se guardó la lista en el contexto bajo la key '{output_key}'.")
&lt;/LI-CODE&gt;
&lt;P&gt;This expects 2 inputs: the key with the "stringified array" and an output key. For example, mine was "array-a-string" and the other "string-a-lista", which after execution, it looks like this in the context:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mbgonzalez_1-1747019392789.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/67525iAC608221489E9DD2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mbgonzalez_1-1747019392789.png" alt="mbgonzalez_1-1747019392789.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that, you get the content of your file in that output key, so you can use&amp;nbsp;&lt;SPAN&gt;FileCreateAndUploadV2 and then upload your blob:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mbgonzalez_3-1747020469688.png" style="width: 138px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/67527iC14A4C6EEBDECD6C/image-dimensions/138x77?v=v2" width="138" height="77" role="button" title="mbgonzalez_3-1747020469688.png" alt="mbgonzalez_3-1747020469688.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 03:28:29 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228755#M4037</guid>
      <dc:creator>mbgonzalez</dc:creator>
      <dc:date>2025-05-12T03:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to work on File Content collected from Azure blob in Playbook</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228791#M4040</link>
      <description>&lt;P&gt;Thanks &lt;SPAN class="UserName lia-user-name lia-user-rank-L1-Bithead lia-component-message-view-widget-author-username"&gt;&lt;A id="link_32" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/78092095" target="_self" aria-label="View Profile of mbgonzalez"&gt;&lt;SPAN class=""&gt;mbgonzalez&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt; you got the point to the exact issue I am facing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I came up to the same state - using script - couple of days back, but was still thinking it could be done with only Transformers.&lt;/P&gt;
&lt;P&gt;It seems it is easier to accept working with script than wasting more time on Transformer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your help, and contribution &lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 07:23:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-work-on-file-content-collected-from-azure-blob-in/m-p/1228791#M4040</guid>
      <dc:creator>xdrengineer</dc:creator>
      <dc:date>2025-05-12T07:23:14Z</dc:date>
    </item>
  </channel>
</rss>

