<?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: Storing Incident Notes in Context Data in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569500#M2903</link>
    <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/209373"&gt;@michaelsysec242&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get a specific comment from your incident you can use the built-in automation&amp;nbsp;&lt;STRONG&gt;commentsToContext&lt;/STRONG&gt; which takes as arguments the &lt;STRONG&gt;entryId&lt;/STRONG&gt; of the comment and &lt;STRONG&gt;contextKey&lt;/STRONG&gt;, which defines where to store the result in context. This works for individual comments, but not for all the comments in your investigation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To pull all the comments from your investigation, you can use in your automation the built-in command &lt;STRONG&gt;getEntries&lt;/STRONG&gt; to get all the entries in your war-room in combination with a category filter for chat entries (see the documentation &lt;A href="https://xsoar.pan.dev/docs/integrations/get-entries-filter" target="_self"&gt;here&lt;/A&gt;.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;res = execute_command("getEntries", {"filter": {"categories": ["chats"]}})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Once you have all your chat entries (comments), you can save them to context and/or output them as a table.&lt;BR /&gt;Find below a simple script to get all the comments and save them to your context data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 16:40:19 GMT</pubDate>
    <dc:creator>AbelSantamarina</dc:creator>
    <dc:date>2023-12-12T16:40:19Z</dc:date>
    <item>
      <title>Storing Incident Notes in Context Data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569485#M2901</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I am working on a use-case in which I need to store text based comments (Including MD) to context data for report generation. I have tried to create a script for this yet I have not succeeded. Is there a way to access the comment section in order to pull comments dynamically ?&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="Cortex XSOAR" id="Cortex_XSOAR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 15:25:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569485#M2901</guid>
      <dc:creator>michaelsysec242</dc:creator>
      <dc:date>2023-12-12T15:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Storing Incident Notes in Context Data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569500#M2903</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/209373"&gt;@michaelsysec242&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get a specific comment from your incident you can use the built-in automation&amp;nbsp;&lt;STRONG&gt;commentsToContext&lt;/STRONG&gt; which takes as arguments the &lt;STRONG&gt;entryId&lt;/STRONG&gt; of the comment and &lt;STRONG&gt;contextKey&lt;/STRONG&gt;, which defines where to store the result in context. This works for individual comments, but not for all the comments in your investigation.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To pull all the comments from your investigation, you can use in your automation the built-in command &lt;STRONG&gt;getEntries&lt;/STRONG&gt; to get all the entries in your war-room in combination with a category filter for chat entries (see the documentation &lt;A href="https://xsoar.pan.dev/docs/integrations/get-entries-filter" target="_self"&gt;here&lt;/A&gt;.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;res = execute_command("getEntries", {"filter": {"categories": ["chats"]}})&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Once you have all your chat entries (comments), you can save them to context and/or output them as a table.&lt;BR /&gt;Find below a simple script to get all the comments and save them to your context data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 16:40:19 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569500#M2903</guid>
      <dc:creator>AbelSantamarina</dc:creator>
      <dc:date>2023-12-12T16:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: Storing Incident Notes in Context Data</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569660#M2909</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/211967"&gt;@AbelSantamarina&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks this works very well.&lt;/P&gt;
&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2023 09:18:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/storing-incident-notes-in-context-data/m-p/569660#M2909</guid>
      <dc:creator>michaelsysec242</dc:creator>
      <dc:date>2023-12-13T09:18:12Z</dc:date>
    </item>
  </channel>
</rss>

