<?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 How to upload CSV string containing \n to XSOAR? in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598134#M3617</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We're writing a custom playbook in &lt;LI-PRODUCT title="Cortex XSOAR" id="Cortex_XSOAR"&gt;&lt;/LI-PRODUCT&gt; that queries Splunk and returns data. The data we receive back from Splunk (via a self-written XSOAR automation, in Python) gets returned as an XML field containing a string that represents a flat CSV file. The &lt;STRONG&gt;\n&lt;/STRONG&gt; character sequence (newline) gets added by Splunk to delimit each new line. When prototyping this code via a test incident and using the &lt;STRONG&gt;FileCreateAndUploadV2&lt;/STRONG&gt; command, it errors when the data parameter contains this escape sequence. What is the best way to wrangle the CSV data into an attachment?&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-center" image-alt="Screenshot 2024-09-18 at 16.46.55.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/62302i2CC2BE05A0B27AB3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-09-18 at 16.46.55.png" alt="Screenshot 2024-09-18 at 16.46.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best!&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 15:50:17 GMT</pubDate>
    <dc:creator>T.Jagielski</dc:creator>
    <dc:date>2024-09-18T15:50:17Z</dc:date>
    <item>
      <title>How to upload CSV string containing \n to XSOAR?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598134#M3617</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We're writing a custom playbook in &lt;LI-PRODUCT title="Cortex XSOAR" id="Cortex_XSOAR"&gt;&lt;/LI-PRODUCT&gt; that queries Splunk and returns data. The data we receive back from Splunk (via a self-written XSOAR automation, in Python) gets returned as an XML field containing a string that represents a flat CSV file. The &lt;STRONG&gt;\n&lt;/STRONG&gt; character sequence (newline) gets added by Splunk to delimit each new line. When prototyping this code via a test incident and using the &lt;STRONG&gt;FileCreateAndUploadV2&lt;/STRONG&gt; command, it errors when the data parameter contains this escape sequence. What is the best way to wrangle the CSV data into an attachment?&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-center" image-alt="Screenshot 2024-09-18 at 16.46.55.png" style="width: 999px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/62302i2CC2BE05A0B27AB3/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-09-18 at 16.46.55.png" alt="Screenshot 2024-09-18 at 16.46.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 15:50:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598134#M3617</guid>
      <dc:creator>T.Jagielski</dc:creator>
      <dc:date>2024-09-18T15:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload CSV string containing \n to XSOAR?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598284#M3621</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Update&lt;/STRONG&gt;: Part of this issue has been resolved by not using the war room to prototype anymore. The command still persists with the&lt;STRONG&gt; invalid escape sequence&lt;/STRONG&gt; error when including &lt;STRONG&gt;\n&lt;/STRONG&gt;, however this is not true when using &lt;EM&gt;shift+enter&lt;/EM&gt; to manually insert a linebreak into the markdown field.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this will live in an automation, there's been success with using &lt;STRONG&gt;Python string literals&lt;/STRONG&gt; to include linebreaks and submit them to the &lt;STRONG&gt;FileCreateAndUploadV2&lt;/STRONG&gt; command, which is then executed using &lt;STRONG&gt;demisto.executeCommand()&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 13:42:50 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598284#M3621</guid>
      <dc:creator>T.Jagielski</dc:creator>
      <dc:date>2024-09-19T13:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload CSV string containing \n to XSOAR?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598530#M3625</link>
      <description>&lt;P&gt;&lt;STRONG&gt;PEBKAC&lt;/STRONG&gt; -- Found that passing in the &lt;STRONG&gt;data=&lt;/STRONG&gt; argument to the &lt;STRONG&gt;FileCreateAndUploadV2 &lt;/STRONG&gt;command can be arbitrary when used from within an automation. The string we passed to it be formatted in whichever way necessary. Getting a CSV with or without newlines is accepted when done via Python scripting. This works as intended for us now.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 09:47:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-to-upload-csv-string-containing-n-to-xsoar/m-p/598530#M3625</guid>
      <dc:creator>T.Jagielski</dc:creator>
      <dc:date>2024-09-23T09:47:31Z</dc:date>
    </item>
  </channel>
</rss>

