Trigger a workflow

Join the Beta!

Workflows are in public beta. If you have any feedback or questions, contact Datadog support.

Request Access

You can trigger a workflow manually, or using a variety of automated methods such as a recurring schedule, a Datadog Monitor, or a Security Signal Notification Rule. Before you can trigger an automatic workflow, you must associate the workflow with a unique service account. For more information on service accounts, see Service accounts for Workflows.

Manually trigger a workflow

To trigger a workflow manually:

  1. From the workflow page, click Run.
  2. Enter the values for existing trigger variables.
  3. When you’re ready to run the workflow, click Save & Run.

Manually trigger a workflow from a Dashboard

To trigger a workflow from a Dashboard, add the Run Workflow widget:

  1. From your Dashboard, click Add Widget.
  2. Search for workflows and add the Run Workflow widget.
  3. Under Select the workflow, find your workflow in the dropdown menu.
  4. Enter a title for the widget and click Save
Click Run Workflow to trigger a workflow from Dashboard widget.

To run the workflow:

  1. Click Run Workflow on your dashboard widget.
  2. Under Execution parameters, enter the required trigger variables for your workflow.
  3. Click Run to run the workflow.

Trigger a workflow from a Monitor

To trigger a workflow from a Monitor:

  1. On the workflow canvas, click Add an Automated Trigger and select @mention.
  2. Click Create to create a service account. For more information, see Service Accounts for Workflows.
  3. Next to @workflow-, enter a mention name for the trigger. Your mention name must be unique.
  4. Save your Workflow.
  5. Navigate to the Monitors page in Datadog.
  6. Find the monitor you’d like to use to trigger the workflow and edit it, or create a new monitor.
  7. In the message section, add the full workflow mention name:
    • The mention name should start with @workflow-. For example, @workflow-my-workflow
    • To pass trigger variables into the workflow, use a comma-separated list with the syntax @workflow-name(key=value, key=value). For example, @workflow-my-workflow(name="Bits", alert_threshold=threshold)
  8. Save the monitor.
Add a monitor trigger to the message section of a Monitor

Each time the monitor threshold is hit, the monitor triggers a workflow run.

Trigger a workflow from a Security Signal Notification Rule

You can set up a workflow to trigger every time a Security Signal Notification Rule fires.

To trigger a workflow from a Notification Rule:

  1. On the workflow canvas, click Add an Automated Trigger and select @mention.
  2. Click Create to create a service account. For more information, see Service Accounts for Workflows.
  3. Next to @workflow-, enter a mention name for the trigger. Your mention name must be unique.
  4. Save your Workflow.
  5. From the Setup & Configuration page, find the Detection Rule you’d like to use to trigger your workflow, or create a new rule.
  6. In the Recipient section, add the full workflow mention name. For example, @workflow-my-workflow.
  7. Click Save and Activate.
Add the workflow name to the recipient section of a Notification rule

Each time the Notification Rule fires, it triggers a workflow run.

Trigger a workflow on a schedule

To schedule a workflow run:

  1. On the workflow canvas, click Add an Automated Trigger and select Schedule.
  2. Click Create to create a service account. For more information, see Service Accounts for Workflows.
  3. Enter a time and frequency for the run.
  4. (Optional) Enter a description for the workflow in the Memo field.
  5. Click Save.

Further reading