Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I format a DQL Query into Adaptive Cards properly - Workflows


From a high-level point of view, I need a workflow which grabs a DQL query of disk free as a percentage and then sends that as a Teams message. 

This is what I have as my first flow (the DQL query)



timeseries percent = avg(, by: {, dt.entity.disk }, filter: { in(, classicEntitySelector("type(host),tag(\"Business Unit:FINANCE_DEPT\")")) }
| fields util = arrayAvg(percent), entityName(




It will then output this in a raw JSON format with the function get_disk_stats_title.records







Im trying to use the adaptive cards but not sure how to format it to generate a human-readable card? 


Dynatrace Advisor
Dynatrace Advisor

Hi @badgerfifteen, I'm not sure I fully understand you question, but I guess it's about how to use the AdaptiveCards SDK in Workflows, is that right? If so, you can load it from a JavaScript CDN like

import * as AdaptiveCards from '';

export default async function ({ execution_id }) {
  const adaptiveCard = new AdaptiveCards.AdaptiveCard();
  // ...

You just have to make sure that is allow-listed from your tenant.

Dynatrace Helper
Dynatrace Helper

Hi @badgerfifteen 

I hope the solution above solution worked for you, if so, please 'accept as solution', to help us close this community question.

Thanks, Penny 

Featured Posts