15 Jan 2026 09:34 AM
Hello,
I want to bring the below data into an email via workflow.
fetch events, from: now()-5m, to: now()
| filter event.kind == "DAVIS_PROBLEM"
| filter event.status_transition == "CREATED"
| fields timestamp, display_id, event.category, event.start, event.end, event.name, event.status, event.status_transition, root_cause_entity_id, root_cause_entity_name
| sort event.start desc
Could you please help, how?
Currently, I'm just getting an email with a link to workflow.
Thanks,
MH
15 Jan 2026 05:50 PM - edited 15 Jan 2026 05:51 PM
Assuming you have at least 3 tasks, the trigger, the DQL, named as "execute_dql_query_1" and the email.
In the email task you should include the previous (DQL) task result in the email Message field, like this:
{{ result("execute_dql_query_1")["records"] | to_json}}This way, you will get the DQL query result as json format in your email.
Try and let us know.
16 Jan 2026 07:58 AM - edited 16 Jan 2026 11:09 AM
Worked :). But throttled with limit so I've reduced the time frame.
Also how can I propagate Dynatrace problem link to each problems?
16 Jan 2026 11:54 AM - edited 16 Jan 2026 11:54 AM
Using the concat function:
fetch events, from: now()-5m, to: now()
| filter event.kind == "DAVIS_PROBLEM"
| filter event.status_transition == "CREATED"
| fieldsAdd tenant.url = "https://<YOURTENANTIDHERE>.apps.dynatrace.com/ui/apps/dynatrace.davis.problems/problem/"
| fieldsAdd problem.url = concat(tenant.url, event.id)
| fields timestamp, display_id, event.category, event.start, event.end, event.name, event.status, event.status_transition, root_cause_entity_id, root_cause_entity_name, problem.url
| sort event.start descTry and let us know.
Featured Posts