Homeโ€บโšก Advancedโ€บModule 101 min read ยท 11/15

Multiplayer (Workflows)

Tutorial1 exercise

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.