Workflows
Workflows are the automation engine โ they react to events, run on schedules, and connect Dynatrace to external systems like email, Slack, Jira, and AWS.
Anatomy of a Workflow
Trigger โ Task 1 โ Task 2 โ Task 3
โ โ โ โ
What starts DQL query Format Send email
the workflow results
Trigger Types
Trigger What Starts It Use Case
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ
Davis problem New or reopened problem Alert notifications
Davis event Any Davis event Fine-grained handling
Schedule Time-based (cron, interval, fixed) Daily reports, weekly trends
On demand Manual "Run" button Testing, ad-hoc
Available Connectors
Connector What It Does
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Email Send email notifications
Slack Send Slack messages
Jira Create/update Jira issues
Microsoft Teams Send Teams messages
ServiceNow Create incidents
PagerDuty Trigger pages
AWS Lambda, S3, EC2 operations
Kubernetes Query/manipulate K8s resources
GitHub / GitLab Create issues, trigger pipelines
HTTP Request Call any REST API
DQL Query Run DQL and use results
JavaScript Custom logic, formatting
Building a Problem Notification Workflow
- Ctrl+K โ "Workflows" โ Create new
- Trigger: Davis problem
- Add task: Send email
- Subject:
{{ event()["event.name"] }} - Body: Problem details with Jinja expressions
- Save โ the workflow fires on every new problem
Jinja Expressions
// Access trigger event data
{{ event()["event.name"] }}
{{ event()["display_id"] }}
// Access previous task results
{{ result("query_task").records[0].hostname }}
// Conditional logic
{% if result("check").value > 90 %}CRITICAL{% else %}OK{% endif %}
Service User Actors
Workflows should run as a service user, not a personal account:
Step Action
โโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 Create service user (Account Management โ IAM)
2 Create policy with required scopes
3 Bind policy to service user's group
4 Set service user as workflow actor
โ ๏ธ Set actor (who tasks run as), NEVER owner (who controls the workflow). Setting owner to a service user permanently locks you out.
๐ Try it: Open Ctrl+K โ "Workflows" โ click "+ Workflow" โ add a trigger (try "Schedule" โ daily at 09:00) โ add a task ("Execute DQL query" โ fetch dt.entity.host | summarize count()). You just built your first automation.
Run JavaScript Action Limits
When using custom JavaScript tasks in workflows, be aware of these hard limits:
Limit Value
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโ
Execution timeout 120 seconds (NOT extendable)
RAM 256 MB
Script size ~5 MB (including context)
Result size 6 MB
Result type JSON only (no binary)
HTTP calls Must be on global allowlist
โ ๏ธ Never return secrets in JS task results โ they're visible to anyone with read access to the workflow.