Advanced — Module 10

Multiplayer (Workflows)

Tutorial

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

What's Next

Module 11 — Deploy your app to production.