AutomationEngine Workflows
Workflows are automated sequences: trigger โ condition โ action. Run DQL queries on schedule, react to events, or chain multiple steps.
import { automationClient } from "@dynatrace-sdk/client-automation";
const workflow = await automationClient.createWorkflow({
title: "Daily Host Report",
trigger: { type: "Schedule", schedule: { rule: "0 8 * * *" } },
tasks: [
{
name: "query_hosts",
action: "dynatrace.automations:run-javascript",
input: { script: `return await fetch('/platform/storage/query/v1/query:execute', ...)` }
}
]
});
๐ก Workflows vs App Functions: workflows run on a schedule or trigger. App functions run on-demand from your UI.
Required Scopes
automation:workflows:read โ list/get workflows
automation:workflows:write โ create/update workflows
automation:workflows:run โ execute workflows
Trigger Types
- Schedule โ cron expression (
0 8 * * *= daily at 8am) - Event โ react to Davis problems, metric thresholds
- Manual โ triggered from your app UI
๐ง Quick Check
What Dynatrace feature lets you chain automated actions (like: alert โ run function โ send Slack message)?
What's Next
Module 11 โ Deploy your app to production.