<?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: Include Linked incidents table in email notification in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544768#M2207</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/295894"&gt;@m.hamadieh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use SearchIncidentV2 script to get info about linked Incidents. It accepts different filters to search for incidents. If you define linked incidents ID inside the playbook it will retrieve the info only about the incidents linked to that incident. Please see the below screenshot. The script gets specific values by default and you can define more if you need. This task will create an output named&amp;nbsp;&lt;STRONG&gt;foundIncidents&amp;nbsp;&lt;/STRONG&gt;which can be used in HTML template. I hope this answers your question.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gyldz_0-1685960652810.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/50647i6F0C460C54CC7253/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gyldz_0-1685960652810.png" alt="gyldz_0-1685960652810.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2023 10:27:02 GMT</pubDate>
    <dc:creator>gyldz</dc:creator>
    <dc:date>2023-06-05T10:27:02Z</dc:date>
    <item>
      <title>Include Linked incidents table in email notification</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544701#M2205</link>
      <description>&lt;P&gt;Dear Community members,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope you are all doing well !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering if there is an option to include linked incident table (can be added to the incident layout) in email template.&lt;/P&gt;
&lt;P&gt;I'm using Mail sender (New) :&amp;nbsp;&lt;A href="https://xsoar.pan.dev/docs/reference/integrations/mail-sender-new" target="_blank"&gt;https://xsoar.pan.dev/docs/reference/integrations/mail-sender-new&lt;/A&gt;&amp;nbsp;for sending email and I'm feeding it my custom html template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if this is not possible, how can I access the incident linked incident table via scripts, to read and write data to the fields inside the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2023 12:43:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544701#M2205</guid>
      <dc:creator>m.hamadieh</dc:creator>
      <dc:date>2023-06-04T12:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Include Linked incidents table in email notification</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544768#M2207</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/295894"&gt;@m.hamadieh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use SearchIncidentV2 script to get info about linked Incidents. It accepts different filters to search for incidents. If you define linked incidents ID inside the playbook it will retrieve the info only about the incidents linked to that incident. Please see the below screenshot. The script gets specific values by default and you can define more if you need. This task will create an output named&amp;nbsp;&lt;STRONG&gt;foundIncidents&amp;nbsp;&lt;/STRONG&gt;which can be used in HTML template. I hope this answers your question.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gyldz_0-1685960652810.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/50647i6F0C460C54CC7253/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gyldz_0-1685960652810.png" alt="gyldz_0-1685960652810.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 10:27:02 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544768#M2207</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-06-05T10:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Include Linked incidents table in email notification</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544811#M2209</link>
      <description>&lt;P&gt;dear&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/287891"&gt;@gyldz&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for taking the time to answer my question , I have tested the script&amp;nbsp;&lt;SPAN&gt;SearchIncidentV2 in the war room and its working as expected.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I'm&lt;SPAN&gt;&amp;nbsp;actually&amp;nbsp;devolving&amp;nbsp;this customization&amp;nbsp;as an automation and not a playbook , I'm&amp;nbsp;executing&amp;nbsp;SearchIncidentV2&amp;nbsp; using&amp;nbsp;demisto.executeCommand but having hard time getting&amp;nbsp;the output or accessing&amp;nbsp;&lt;STRONG&gt;foundIncidents&amp;nbsp;&lt;/STRONG&gt;after executing&amp;nbsp;the command ,could you help with that.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 13:11:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544811#M2209</guid>
      <dc:creator>m.hamadieh</dc:creator>
      <dc:date>2023-06-05T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Include Linked incidents table in email notification</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544825#M2210</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/295894"&gt;@m.hamadieh&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use&amp;nbsp;&lt;STRONG&gt;GetIncidentsByQuery&lt;/STRONG&gt; command for that purpose. It will enable you to define populated fields. Please see the below script as a reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;incident = demisto.incident()
incident_id = incident.get("id")
linked_incidents = incident.get("linkedIncidents")

if linked_incidents:
    for linked_incident in linked_incidents:
        query=f"id:{linked_incident}"
        populate_fields = ["id", "name","type"]
        res = demisto.executeCommand('GetIncidentsByQuery', {
                'query': query,
                'populateFields': ' , '.join(populate_fields)
            })

        if is_error(res):
           return_error(res)
        incident = json.loads(res[0]['Contents'])
        demisto.results(incident)
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 15:04:58 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544825#M2210</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-06-05T15:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Include Linked incidents table in email notification</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544921#M2214</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/287891"&gt;@gyldz&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks for the code snippet , working perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is there any documentation on how to set and get incidents fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again , have a nice day !&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 12:48:36 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/include-linked-incidents-table-in-email-notification/m-p/544921#M2214</guid>
      <dc:creator>m.hamadieh</dc:creator>
      <dc:date>2023-06-06T12:48:36Z</dc:date>
    </item>
  </channel>
</rss>

