<?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 Get information from Davis problem trigger in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248241#M1605</link>
    <description>&lt;P&gt;Hi community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i would like to send problem information to our to ticket system, to inform our customer. Important for this worklfow is the information, which entity is reporting. We send the information to the teams in&amp;nbsp;dependency of the entity.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunatly the object in the worklfow "Davis&amp;nbsp; problem trigger" only has the information of the affected entity as Id like this ["HOST-B800B96861849859"].&amp;nbsp; For this reason, i can't send a http-request to the entity, because it isn't the matching https format.&amp;nbsp; (I know the parameter "affected entity id" is not the best, but first i would like to work with that.)&lt;/P&gt;
&lt;P&gt;So i have to customize the information in a java script object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Placeholder like {{...}} are not working in Java script. So we tried this script to get the informatione from the object "Davis problem trigger"&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;import { execution } from '@dynatrace-sdk/automation-utils';&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;const previousTaskName = 'Davis problem trigger&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;export default async function ({ execution_id }) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var exe = await execution(execution_id);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(execution_id); &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;var task_result = await exe.result(previousTaskName);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(task_result);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;var records = task_result['records'];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(records);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;--------------------------------------------------&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The output from this script says, that there is no matching object with this id. I checked this information, and saw, that die Id from the object "Davis problem trigger" matched with the id, which ist not found from the script.&lt;/P&gt;
&lt;P&gt;Now I have no idea what to do next. I didn't found any solutions in the documentation and Community.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me? Are my thoughts to get this information to complicated?&lt;/P&gt;
&lt;P&gt;I`m looking forward to your answers!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2026 06:57:36 GMT</pubDate>
    <dc:creator>Marius_Hell</dc:creator>
    <dc:date>2026-03-30T06:57:36Z</dc:date>
    <item>
      <title>Get information from Davis problem trigger</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248241#M1605</link>
      <description>&lt;P&gt;Hi community,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i would like to send problem information to our to ticket system, to inform our customer. Important for this worklfow is the information, which entity is reporting. We send the information to the teams in&amp;nbsp;dependency of the entity.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunatly the object in the worklfow "Davis&amp;nbsp; problem trigger" only has the information of the affected entity as Id like this ["HOST-B800B96861849859"].&amp;nbsp; For this reason, i can't send a http-request to the entity, because it isn't the matching https format.&amp;nbsp; (I know the parameter "affected entity id" is not the best, but first i would like to work with that.)&lt;/P&gt;
&lt;P&gt;So i have to customize the information in a java script object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Placeholder like {{...}} are not working in Java script. So we tried this script to get the informatione from the object "Davis problem trigger"&lt;/P&gt;
&lt;P&gt;---------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;import { execution } from '@dynatrace-sdk/automation-utils';&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;const previousTaskName = 'Davis problem trigger&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;export default async function ({ execution_id }) &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;var exe = await execution(execution_id);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(execution_id); &lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;var task_result = await exe.result(previousTaskName);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(task_result);&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;var records = task_result['records'];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;console.log(records);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;--------------------------------------------------&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;The output from this script says, that there is no matching object with this id. I checked this information, and saw, that die Id from the object "Davis problem trigger" matched with the id, which ist not found from the script.&lt;/P&gt;
&lt;P&gt;Now I have no idea what to do next. I didn't found any solutions in the documentation and Community.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you help me? Are my thoughts to get this information to complicated?&lt;/P&gt;
&lt;P&gt;I`m looking forward to your answers!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Marius&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2026 06:57:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248241#M1605</guid>
      <dc:creator>Marius_Hell</dc:creator>
      <dc:date>2026-03-30T06:57:36Z</dc:date>
    </item>
    <item>
      <title>Re: Get informationen from Davis problem trigger</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248249#M1606</link>
      <description>&lt;P&gt;You can grab the event payload for event-triggered workflows from the execution params like this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;import { execution } from '@dynatrace-sdk/automation-utils';

export default async function ({ execution_id }) {
  // your code goes here
  // e.g. get the current execution
  const ex = await execution(execution_id);
  const problem_event = ex.params.event

  console.log('Affected entity IDs', problem_event.affected_entity_ids);
}&lt;/LI-CODE&gt;
&lt;P&gt;Which would have a result like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_0-1718269755793.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20524iCBECED1F85BE52E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_0-1718269755793.png" alt="ChristopherHejl_0-1718269755793.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But you could also use it directly in other tasks in the input using expression, eg in the http request like this&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_1-1718269786311.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20525iB1C59393810CDFAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_1-1718269786311.png" alt="ChristopherHejl_1-1718269786311.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristopherHejl_2-1718269795076.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20526iDDACEA82831CF869/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristopherHejl_2-1718269795076.png" alt="ChristopherHejl_2-1718269795076.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 09:10:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248249#M1606</guid>
      <dc:creator>ChristopherHejl</dc:creator>
      <dc:date>2024-06-13T09:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Get informationen from Davis problem trigger</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248258#M1607</link>
      <description>&lt;P&gt;Thank you for your fast solution. Especially the second solutions is more efficient than the intended way from me.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 11:54:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/248258#M1607</guid>
      <dc:creator>Marius_Hell</dc:creator>
      <dc:date>2024-06-13T11:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get informationen from Davis problem trigger</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/296825#M2548</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;let me bring up this again.&lt;BR /&gt;It seems to work with fields that have _ as seperator. But how does that work with fields that have . ?&lt;BR /&gt;like event.id or host.name&lt;BR /&gt;I tried it like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;problem_url : environmentUrl + '/ui/apps/dynatrace.davis.problems/problem/' + problem_event.event.id&lt;/LI-CODE&gt;&lt;P&gt;But I get&amp;nbsp; the message:&amp;nbsp;&lt;BR /&gt;An error of type UNCAUGHT_EXCEPTION occurred in line 15 (col 108) " problem_url : environmentUrl + '/ui/apps/dynatrace.davis.problems/problem/' + problem_event.event.id,": TypeError: Cannot read properties of undefined (reading 'id')&amp;nbsp;&lt;/P&gt;&lt;P&gt;problem_event in my case is a const of ex.params.event.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2026 12:37:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/296825#M2548</guid>
      <dc:creator>joerg_normann</dc:creator>
      <dc:date>2026-03-27T12:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Get informationen from Davis problem trigger</title>
      <link>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/296827#M2549</link>
      <description>&lt;P&gt;found it:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;problem_url : environmentUrl + '/ui/apps/dynatrace.davis.problems/problem/' + problem_event['event.id'],&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Mar 2026 12:44:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Get-information-from-Davis-problem-trigger/m-p/296827#M2549</guid>
      <dc:creator>joerg_normann</dc:creator>
      <dc:date>2026-03-27T12:44:43Z</dc:date>
    </item>
  </channel>
</rss>

