Create an automation
On the Automations page, select the + icon to create a new automation. You’ll be prompted to configure:- A trigger condition that causes the automation to execute.
- One or more actions carried out by the automation.
- Details about the automation, such as a name and description.
Create automations with the CLI
You can create automations from YAML or JSON files using the Prefect CLI:Single automation example
Here’s an example YAML file that creates an automation to cancel long-running flows:Multiple automations example
You can also create multiple automations at once by using theautomations:
key. If any automation fails to create, the command will continue with the remaining automations and report both successes and failures:
Create automations with the Python SDK
You can create and access any automation with the Python SDK’sAutomation
class and its methods.