<?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 Establish Criteria for Workflow Conditions in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269073#M2022</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I am creating an automation for the registration of new databases via Dynatrace Workflows and I send a notification via Teams when a database is registered. However, we do not always have a database to register, and when there is none, I return a message saying "No Database." I am looking for a condition so that when this message is received in the Workflows, it does not trigger the notification, and only sends the notification when a database is actually registered. I would appreciate the community's support in trying to create this, as I have made several attempts without success.&lt;/SPAN&gt;&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-inline" image-alt="Fer_henrique_1-1738589830686.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26145iC827647DCAF09EF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fer_henrique_1-1738589830686.png" alt="Fer_henrique_1-1738589830686.png" /&gt;&lt;/span&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2025 13:37:38 GMT</pubDate>
    <dc:creator>Fer_henrique</dc:creator>
    <dc:date>2025-02-03T13:37:38Z</dc:date>
    <item>
      <title>Establish Criteria for Workflow Conditions</title>
      <link>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269073#M2022</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am creating an automation for the registration of new databases via Dynatrace Workflows and I send a notification via Teams when a database is registered. However, we do not always have a database to register, and when there is none, I return a message saying "No Database." I am looking for a condition so that when this message is received in the Workflows, it does not trigger the notification, and only sends the notification when a database is actually registered. I would appreciate the community's support in trying to create this, as I have made several attempts without success.&lt;/SPAN&gt;&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-inline" image-alt="Fer_henrique_1-1738589830686.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26145iC827647DCAF09EF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fer_henrique_1-1738589830686.png" alt="Fer_henrique_1-1738589830686.png" /&gt;&lt;/span&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 13:37:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269073#M2022</guid>
      <dc:creator>Fer_henrique</dc:creator>
      <dc:date>2025-02-03T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Establish Criteria for Workflow Conditions</title>
      <link>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269080#M2023</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;assuming you have a workflow with multiple tasks, one of which the "put_execute" you screenshoted, that has the message you want to depend upon.&lt;BR /&gt;Assuming you have a followup task to this, that sends the MS teams message, you can add a custom condition on the conditions tab of the task which sends the ms teams message, to only run if the message is NOT "no database registered." the conditions would be&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{{ result("put_execute")["message"] != "no database registered." }}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_1-1738591870790.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26150i47193C13493F3A76/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_1-1738591870790.png" alt="ChristopherHejl_1-1738591870790.png" /&gt;&lt;/span&gt;&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-inline" image-alt="ChristopherHejl_0-1738591844512.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/26149i3DC1418C327607A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_0-1738591844512.png" alt="ChristopherHejl_0-1738591844512.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The custom condition can contain any expression that results in a boolean. In this case we check the message of the result of the previous task and compare to a string. You can also use other functions, use things like regex search, compare integer values etc. See&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/shortlink/automation-workflow-expression-reference#strings" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/automation-workflow-expression-reference#strings&lt;/A&gt;&lt;BR /&gt;I'd suggest to rely on a bit of a different value than the message as it's easy to change the message slightly, like capitalizing, removing a ".", etc and break your condition.&lt;BR /&gt;&lt;BR /&gt;Best,&lt;BR /&gt;Christopher&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 14:14:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269080#M2023</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2025-02-03T14:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Establish Criteria for Workflow Conditions</title>
      <link>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269081#M2024</link>
      <description>&lt;P&gt;I think it would be something like this in your condition setting for the notification step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;{{ result("put_execute").message != "No database registered" }}&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 14:15:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Establish-Criteria-for-Workflow-Conditions/m-p/269081#M2024</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-02-03T14:15:05Z</dc:date>
    </item>
  </channel>
</rss>

