# export  functions in workflow

**URL:** <https://community.dynatrace.com/t/export-functions-in-workflow/50632>\
**Category:** Automations\
**Tags:** workflows, automations\
**Created:** [March 10, 2025, 8:24am UTC](https://community.dynatrace.com/t/export-functions-in-workflow/50632 "2025-03-10T08:24:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [March 10, 2025, 8:24am UTC](https://community.dynatrace.com/t/export-functions-in-workflow/50632/1 "2025-03-10T08:24:48Z")

</div>

Good morning,

Could I use a workflow element like this:

export default async function

( . . . )

export one async function

( . . . )

export two async function

( . . . )

export three async function

KR Henk

( . . . )

KR Henk

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [March 10, 2025, 3:35pm UTC](https://community.dynatrace.com/t/export-functions-in-workflow/50632/2 "2025-03-10T15:35:30Z")

</div>

Reading the documentation, this it not possible.&nbsp; It would be nice to add your own functions and be able to get a more “functional structure” (my opinion). But for this you need to use an app, where you have more freedom (-l

---

<div class="post-metadata">

**Author:** ![christian\_kreuz](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/christian_kreuz/32/21669_2.png) [@christian\_kreuz](https://community.dynatrace.com/u/christian_kreuz)\
**Post date:** [March 21, 2025, 8:02am UTC](https://community.dynatrace.com/t/export-functions-in-workflow/50632/3 "2025-03-21T08:02:47Z")

</div>

There are a couple of ways to achieve what you want.

1. You could use config-as-code (Monaco, Terraform) and put your JavaScript functions in .js files, and re-use those files. It’s not going to be perfect though, and generally the config-as-code approach with Workflows is a bit tricky (but once you know how it works, it’s super easy).

2. You could [create your own Dynatrace App](http://developer.dynatrace.com/quickstart/first-app-in-5-minutes/), and extend it with [Custom Workflow Actions](https://developer.dynatrace.com/develop/workflows/create-custom-action/). This is the way to go once you are looking into a more functional structure, and most likely also wanting to share those actions across multiple Workflows, or potentially multiple Dynatrace environments.

---

<div class="post-metadata">

**Author:** ![henk\_stobbe](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/henk_stobbe/32/30434_2.png) [@henk\_stobbe](https://community.dynatrace.com/u/henk_stobbe)\
**Post date:** [March 21, 2025, 8:47am UTC](https://community.dynatrace.com/t/export-functions-in-workflow/50632/4 "2025-03-21T08:47:59Z")

</div>

Cool answer, need some time to digest (-; thanks!
