Build workflows

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Workflow Automation is not supported for your selected Datadog site ().

You can create workflows or edit existing workflows from the Workflow Automation page. The page lists information about existing workflows, such as the workflow’s owner, the trigger type, the dates that each workflow was last modified and executed, and whether the workflow is published or not.

  • Hover over a workflow for the options to delete, clone, or edit the permissions for the workflow.
  • Toggle My workflows if you want to see only workflows that you created.

Build a workflow from a blueprint

  1. Click the Blueprints tab.
  2. If desired, use the search bar to narrow the list of blueprints by name, category, or integration.
  3. Find the blueprint you’d like to use, and click on it. The workflow canvas appears.
  4. Click Create From Blueprint. The workflow canvas updates to show your newly created workflow.
  5. Enter a new name and description for the workflow.
  6. Optionally, select or enter tags you’d like to apply to the workflow. For more information on Datadog tags, see Getting Started with Tags.
  7. Optionally, select any related services to apply to the workflow.
  8. Optionally, select teams to associate with the workflow. If a team doesn’t exist, you can enter a name to create it.
  9. Click Save to apply your changes.
  10. Workflow steps that require updates are marked with exclamation marks. Click on each workflow step you’d like to modify and fill in any empty fields on the Configure tab.
  11. When you are finished modifying the workflow, Click Run to test your workflow.
  12. When you’re ready to publish your workflow, click Publish. Published workflows accrue costs based on workflow executions. For more information, see the Datadog Pricing page.

Create a workflow with AI

If you’re not sure where to start, you can automatically generate a workflow with AI. To generate a workflow:

  1. From the Workflow Automation page, click New Workflow.
  2. Click Build with Bits AI.
  3. Enter a detailed description for your workflow. Specify the integrations and actions you’d like to use.
  4. Click the up arrow () to create your app.

Create a custom workflow

To create a workflow, click New workflow on the Workflow Automation page.

To configure your workflow:

  1. In the workflow configuration panel, enter a Name for your workflow.
  2. Optionally, select or enter tags you’d like to apply to the workflow. For more information on Datadog tags, see Getting Started with Tags.
  3. Optionally, select any related services to apply to the workflow.
  4. Optionally, select teams to associate with the workflow. If a team doesn’t exist, you can enter a name to create it.
  5. Enter input or output parameters if your workflow uses them.
  6. Click Save to apply your changes.

If you’re not sure about your workflow configuration, you can return to the panel later by clicking anywhere on the workflow canvas.

Build a workflow with the workflow builder

  1. If your workflow requires a trigger, click Add Trigger. For more information, see Trigger a Workflow.
  2. Click Add Step to start adding steps to your workflow.
  3. Search for an action using the search bar or browse through the integrations and their related actions to find the action you’re looking for. Click an action to add it as a step on your workflow canvas.
  4. Click on the step in the workflow canvas to configure it or view its outputs or context variables. For more information on outputs and context variables, see Context variables.
  5. After you’ve configured the step, click either the AI icon or the plus icon (+) to add another step, or save the workflow if you’re done.
  6. When you’re ready to publish your workflow, click Publish. Published workflows accrue costs based on workflow executions. For more information, see the Datadog Pricing page.

You can edit a step in the workflow at any time by clicking on it. Click and drag steps on your workflow to rearrange them.

Shortcuts and canvas tools

To see keyboard and mouse shortcuts for the workflow builder canvas, type ? (shift+/) or click the Keyboard button. A list of shortcuts appears.

The Zoom out , Zoom in , and Reset viewport buttons control how the viewport is displayed.

The Auto layout button aligns and distributes your workflow steps.

The Add annotation button allows you to add annotation notes to your workflow. These notes offer a formatting bar to add various text formatting such as bold and italics, links, and lists. You can also enter your annotations in Markdown.

An empty annotation, with the formatting bar displayed above it

Test a step

See the test and debug page for information on how to test a step.

Publish a workflow

Scheduled and triggered workflows don’t trigger automatically until you’ve published them. To publish the workflow, click Publish from the workflow’s page.

Published workflows accrue costs based on workflow executions. For more information, see the Datadog Pricing page.

Variables and parameters

For information on using variables and parameters in your workflows, see Variables and parameters.

Workflow notifications

You can configure your workflow to send you a notification on success or failure. The following integrations are supported:

  • Slack
  • Microsoft Teams
  • PagerDuty
  • Email

To add a notification:

  1. In the workflow configuration panel, scroll down to the Notifications section.
  2. To add a notification if the workflow succeeds:
    1. Click the plus (+) icon next to Notify on success.
    2. Select the integration that you want to use for notifications.
    3. Complete the required fields for the specified integration.
    4. Click Save to save your workflow.
  3. To add a notification if the workflow fails:
    1. Click the plus (+) icon next to Notify on failure.
    2. Select the integration that you want to use for notifications.
    3. Complete the required fields for the specified integration.
    4. Click Save to save your workflow.

Error handling

You can specify the number of times you want your workflow to retry a failed step, and at what interval, before moving on to an optional error path. If no error path is present, the workflow terminates after all retries are exhausted.

Retries

To configure retries for a step:

  1. Click on the step in the workflow canvas.
  2. In the Retries section, adjust the Interval and Max retries values.
  3. Save your workflow to apply the changes.

Add an error path

You can add an error path for the workflow to follow if it encounters an error.

To add an error path:

  1. Hover over the step where you’d like to add an error path.
  2. Click and drag the Error path icon to place a new error path on the canvas.
  3. Select a workflow step to add to the error path.
  4. After configuring your step, you can add more steps to an error path and even merge your error path back into the main workflow path.
  5. When you’re done configuring your error path steps, click Save to apply your changes.

Wait until condition

Some actions allow you to add a condition that must be met before a workflow can mark a step as complete and continue.

To add a condition:

  1. Click on the step in the workflow canvas.
  2. In the Wait until condition section, use the dropdown to select a preconfigured condition, or select Configure custom wait condition and build your own conditional.
    • The list of available preconfigured conditions depends on the action.
    • Conditional statement variables can be either a String, a Number, a Boolean, or a step output variable.
    • Only the current step’s output variables can be used in a custom conditional statement.
  3. Enter a maximum wait time for the workflow. If the condition is not met in time, the step fails.
An example of wait until condition

Edit a workflow with JSON

Edit a workflow in JSON by clicking Edit JSON Spec on your workflow page. The JSON editor also allows you to:

  • Format JSON: Beautify your JSON.
  • Export JSON: Download the workflow.

Interact with workflows using the API

To perform tasks using the API, see the Workflow Automation API documentation.

Further reading


Do you have questions or feedback? Join the #workflows channel on the Datadog Community Slack.