このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、
お気軽にご連絡ください。
Workflow Automation is not supported for your selected
Datadog site (
).
Use Logic actions to add control logic to your workflow. For example, you can branch from a condition, perform an action iteratively, include a sleep interval, and more.
Branch workflow from condition
You can branch the execution path of your workflow based on the evaluation of one or more statements that you define. In the screenshot below, a Branch workflow from condition action determines the next step in the workflow based on whether the status code of a previous HTTP request action returns 200
.
Sleep
The Sleep action pauses the execution of the workflow for a specified duration. Select a predefined duration from the Duration drop-down, or enter a custom variable in seconds.
For loop
The For loop action allows you to execute a set of actions iteratively for each item in a given input list. For loops accept an input list of up to 2000 items. You can perform many different operations within a for loop, including configuring error paths for individual iterations that fail.
In the example below, a for loop iterates over a list of incidents and sends a Slack message for any incident that is more than a week old.
To add a for loop to your workflow:
- Click the plus (+) icon on your workflow canvas to open the action catalog.
- Search for and select the For loop step.
- Click the loop step and enter an Input list for the step to iterate over. You can enter a custom list or use a workflow variable.
- Inside the loop frame, click the (+) icon to add a step to the loop.
- Configure the looped action. To access the current value in the input list, use the
{{Current.Value}}
variable. To access the index of the current value, use {{Current.Index}}
. - Add and configure any additional steps you need to loop.
- Save and Publish the workflow.
When a run completes, the workflow enters Debug mode. Select a step within the loop to see a list of All, Failed, or Successful iterations for that step. Select an iteration to see the output or the error message.
Further Reading
Do you have questions or feedback? Join the #workflows channel on the Datadog Community Slack.