<?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: Is there a way to try 'except' functionality with playbook? in Splunk SOAR</title>
    <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/628391#M1098</link>
    <description>&lt;P&gt;Yep - just like &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222170"&gt;@phanTom&lt;/a&gt;&amp;nbsp; says - you can check the "status" output for an app action. I would do something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CS__0-1674700162022.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23562iDE8AE7D7B67F1D6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CS__0-1674700162022.png" alt="CS__0-1674700162022.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The decision checks the status of the Splunk "Run Query" app action, if successful; end, Else; send an email.&lt;BR /&gt;&lt;BR /&gt;You can do stiff with "try/except" in regular codeblocks but to be honest they become&amp;nbsp; a pain to manage in larger playbooks.&amp;nbsp; I know when i started with playbooks, i had to try and unlearn how I'd do it in python, and think about it in terms of SOAR's playbook capabilities, but I am better off for it &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 02:32:40 GMT</pubDate>
    <dc:creator>CS_</dc:creator>
    <dc:date>2023-01-26T02:32:40Z</dc:date>
    <item>
      <title>Is there a way to try 'except' functionality with playbook?</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/627518#M1079</link>
      <description>&lt;P&gt;Fairly new to writing playbooks within Phantom and so far havent found documentation for this yet:&lt;BR /&gt;I'm trying to create an email notification (or something along those lines) whenever a playbook fails to complete for whatever reason (main fail case is if a splunk search fails/job dies). Basically almost like a try/except block but in Phantom. Has anyone found a way to incorporate this in phantom?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 21:13:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/627518#M1079</guid>
      <dc:creator>nongingerale</dc:creator>
      <dc:date>2023-01-19T21:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Try Except functionality with playbook</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/627560#M1080</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253030"&gt;@nongingerale&lt;/a&gt;&amp;nbsp;this is something you need to build into your playbook(s).&amp;nbsp;&lt;/P&gt;&lt;P&gt;All actions have a 'status' output which can be used in a decision block which then checks for the success/failed output and if not success then route down a path to a 'send_email' action or input playbook. I would recommend input playbook so you can re-use for all failures in your automation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For checking playbook failures, rather than action failures, you would probably need to use REST to check `/rest/playbook_run` for any that have a status of failed on a schedule (use timer app) and then sends an email if more than 1 failure found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;Happy SOARing!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 10:21:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/627560#M1080</guid>
      <dc:creator>phanTom</dc:creator>
      <dc:date>2023-01-19T10:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to try 'except' functionality with playbook?</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/628391#M1098</link>
      <description>&lt;P&gt;Yep - just like &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222170"&gt;@phanTom&lt;/a&gt;&amp;nbsp; says - you can check the "status" output for an app action. I would do something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CS__0-1674700162022.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23562iDE8AE7D7B67F1D6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CS__0-1674700162022.png" alt="CS__0-1674700162022.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The decision checks the status of the Splunk "Run Query" app action, if successful; end, Else; send an email.&lt;BR /&gt;&lt;BR /&gt;You can do stiff with "try/except" in regular codeblocks but to be honest they become&amp;nbsp; a pain to manage in larger playbooks.&amp;nbsp; I know when i started with playbooks, i had to try and unlearn how I'd do it in python, and think about it in terms of SOAR's playbook capabilities, but I am better off for it &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 02:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/628391#M1098</guid>
      <dc:creator>CS_</dc:creator>
      <dc:date>2023-01-26T02:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to try 'except' functionality with playbook?</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/630833#M1120</link>
      <description>&lt;P&gt;that makes sense, thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:05:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/630833#M1120</guid>
      <dc:creator>nongingerale</dc:creator>
      <dc:date>2023-02-14T16:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: Try Except functionality with playbook</title>
      <link>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/630834#M1121</link>
      <description>&lt;P&gt;thanks! appreciate the help&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 16:05:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-SOAR/Is-there-a-way-to-try-except-functionality-with-playbook/m-p/630834#M1121</guid>
      <dc:creator>nongingerale</dc:creator>
      <dc:date>2023-02-14T16:05:53Z</dc:date>
    </item>
  </channel>
</rss>

