DQL
Questions about Dynatrace Query Language
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Workflow - Bring events into an email

munawarhossain3
Visitor

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

1 REPLY 1

dannemca
DynaMight Guru
DynaMight Guru

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.

https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/email#sending-json-payloa... 

Try and let us know.

Site Reliability Engineer @ Kyndryl

Featured Posts