# Run DQL query and export output as email in workflows

**URL:** <https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677>\
**Category:** Automations\
**Tags:** dql, workflows\
**Created:** [July 28, 2025, 5:47pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677 "2025-07-28T17:47:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [July 28, 2025, 5:47pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/1 "2025-07-28T17:47:13Z")

</div>

Hello Team ,

Currently, we’ve tested a basic workflow that runs a DQL query and sends an email. However, we’re looking to find out if there’s a feature within Dynatrace Workflows that allows sending the query results as a formatted report, preferably attached as an Excel or CSV file. Has anyone already experimented with this?

Thank you!

---

<div class="post-metadata">

**Author:** ![Kenny\_Gillette](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/kenny_gillette/32/20170_2.png) [@Kenny\_Gillette](https://community.dynatrace.com/u/Kenny_Gillette)\
**Post date:** [July 29, 2025, 1:47pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/2 "2025-07-29T13:47:35Z")

</div>

I was wondering same thing.&nbsp; You could send a link Via Workflow to dql dashboard then user could download result.&nbsp; I have set that up.

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [July 29, 2025, 2:29pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/3 "2025-07-29T14:29:29Z")

</div>

I would love to do something similar but with a pdf of a dashboard.

---

<div class="post-metadata">

**Author:** ![Julius\_Loman](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/julius_loman/32/51_2.png) [@Julius\_Loman](https://community.dynatrace.com/u/Julius_Loman)\
**Post date:** [July 29, 2025, 2:47pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/4 "2025-07-29T14:47:10Z")

</div>

Very good idea, in general, this is of course possible, by developing a custom workflow action ( see&nbsp;[Create a custom workflow action | Dynatrace Developer](https://developer.dynatrace.com/develop/workflows/create-custom-action/)&nbsp;), but it needs some JavaScript&nbsp; / React developer knowledge.

---

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [July 29, 2025, 10:52pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/5 "2025-07-29T22:52:28Z")

</div>

Hi&nbsp;[@Julius\_Loman](https://community.dynatrace.com/user/3364)&nbsp;,  
I also strongly believe this can be achieved using JavaScript or React. Since my Java skills are quite poor, my hope is that if someone here has already developed a similar solution, I could ask for their help or request them to share the code. 😅

---

<div class="post-metadata">

**Author:** ![Akhil-Jayendran](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/akhil-jayendran/32/153_2.png) [@Akhil-Jayendran](https://community.dynatrace.com/u/Akhil-Jayendran)\
**Post date:** [July 29, 2025, 11:01pm UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/6 "2025-07-29T23:01:20Z")

</div>

Hi&nbsp;[@Kenny\_Gillette](https://community.dynatrace.com/user/36140)&nbsp;,

Thank you for this. This is one of the options we currently have, but I was wondering if we&nbsp;can also attach files to emails, as some existing tools already support this feature.

---

<div class="post-metadata">

**Author:** ![Tommaso\_Fin](https://avatars.discourse-cdn.com/v4/letter/t/f475e1/32.png) [@Tommaso\_Fin](https://community.dynatrace.com/u/Tommaso_Fin)\
**Post date:** [February 3, 2026, 8:07am UTC](https://community.dynatrace.com/t/run-dql-query-and-export-output-as-email-in-workflows/52677/7 "2026-02-03T08:07:25Z")

</div>

Hi, is this feature on the roadmap? I know this could be achieved as a custom workflow task, but i think should be a standard feature since needed by several customers and a quite basic need

thanks
