이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.
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
- Click the Blueprints tab.
- If desired, use the search bar to narrow the list of blueprints by name, category, or integration.
- Find the blueprint you’d like to use, and click on it. The workflow canvas appears.
- Click Create From Blueprint. The workflow canvas updates to show your newly created workflow.
- Enter a new name and description for the workflow.
- Optionally, select or enter tags you’d like to apply to the workflow. For more information on Datadog tags, see Getting Started with Tags.
- Optionally, select any related services to apply to the workflow.
- Optionally, select teams to associate with the workflow. If a team doesn’t exist, you can enter a name to create it.
- Click Save to apply your changes.
- 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.
- When you are finished modifying the workflow, Click Run to test your workflow.
- 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:
- From the Workflow Automation page, click New Workflow.
- Click Build with Bits AI.
- Enter a detailed description for your workflow. Specify the integrations and actions you’d like to use.
- 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:
- In the workflow configuration panel, enter a Name for your workflow.
- Optionally, select or enter tags you’d like to apply to the workflow. For more information on Datadog tags, see Getting Started with Tags.
- Optionally, select any related services to apply to the workflow.
- Optionally, select teams to associate with the workflow. If a team doesn’t exist, you can enter a name to create it.
- Enter input or output parameters if your workflow uses them.
- 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
- If your workflow requires a trigger, click Add Trigger. For more information, see Trigger a Workflow.
- Click Add Step to start adding steps to your workflow.
- 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.
- 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.
- 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.
- 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.
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.
Context variables
Creating useful workflows sometimes necessitates passing data from one step to another, or configuring steps that act on data from the workflow’s trigger source. You can perform this kind of data interpolation with context variables.
- Workflow variables give you information about the current workflow:
WorkflowName
: The name of the workflow.WorkflowId
: The ID of the workflow.InstanceId
: The ID of the execution instance of the workflow.
- Some steps come with built-in step output variables that allow you to pass data from that step to a subsequent step in your workflow.
- Trigger variables are passed into the workflow by the triggering event.
- Source object variables are passed into the workflow by the triggering event.
The Context Variables tab for each step provides a map of all context variables available to that step.
Access a context variable in a step by enclosing it in double braces ({{
). To access fields within context variables, use Handlebars expression syntax.
Step output variables
Some steps create outputs that are available to subsequent steps in a workflow. Access a step variable with the syntax: Steps.<step_name>.<variable>
. For example, to retrieve the pull request status variable (state
) from the GitHub pull request status step (Get_pull_request_status
), you’d use the following context variable:
{{ Steps.Get_pull_request_status.state }}
If you’re not sure what variable you’re looking for, Datadog suggests existing step outputs as you type. Alternatively, you can consult the Context Variables tab for a list of available variables.
Input parameters are immutable key-value pairs that you can use to pass data into a workflow. You can use input parameters in workflows that:
- are triggered manually, such as from a Dashboard.
- use mention triggers, such as Monitors and Security Signal Notification Rules.
To add an input parameter:
- Click on the workflow canvas.
- Click the + icon next to Input Parameters.
- Add a parameter name, data type, and description for the parameter. The display name is generated automatically from the parameter name. Check the Use custom display name box to customize it. The display name is a human readable name for the parameter, while the parameter name is used to reference the parameter in your workflow steps.
- Optionally, add a default value for the parameter. If you add a default value, the parameter is optional at runtime.
To reference the input parameter in a step, use the syntax {{ Trigger.<parameter name>}}
. For example, to reference an input parameter named user
, use {{Trigger.user}}
.
The Input Parameters section displays the names of all existing input parameters together with a counter. Hover over a counter to see which steps are using the parameter.
You can add an implicit input parameter (a parameter that doesn’t already exist in the workflow) by typing it into a workflow step using the {{ Trigger.<parameter name> }}
syntax. The next time you save the workflow, a dialog appears allowing you to convert the parameter to an explicit parameter. For more information on triggering workflows, see Trigger a workflow.
If you’re looking for an existing input parameter, start typing {{ Trigger.
to see if it appears as a suggestion. Alternatively, consult the Context Variables tab for a list of available parameters.
Source object variables
Source object variables are properties of the triggering event that are resolved at execution. The variables available in the workflow depend on the type of trigger that initiated the workflow instance. For example, if the workflow instance is triggered by a monitor, the monitor ID variable is available using {{Source.monitor.id}}
. If the workflow is triggered by a security signal detection or notification rule, the signal ID is available using {{Source.securitySignal.id}}
.
All the variables of the Source object are visible in the Context Variables tab.
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:
- In the workflow configuration panel, scroll down to the Notifications section.
- To add a notification if the workflow succeeds:
- Click the plus (
+
) icon next to Notify on success. - Select the integration that you want to use for notifications.
- Complete the required fields for the specified integration.
- Click Save to save your workflow.
- To add a notification if the workflow fails:
- Click the plus (
+
) icon next to Notify on failure. - Select the integration that you want to use for notifications.
- Complete the required fields for the specified integration.
- 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:
- Click on the step in the workflow canvas.
- In the Retries section, adjust the Interval and Max retries values.
- 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:
- Hover over the step where you’d like to add an error path.
- Click and drag the Error path icon to place a new error path on the canvas.
- Select a workflow step to add to the error path.
- 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.
- 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:
- Click on the step in the workflow canvas.
- 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.
- Enter a maximum wait time for the workflow. If the condition is not met in time, the step fails.
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.
Further reading
Do you have questions or feedback? Join the #workflows channel on the Datadog Community Slack.