Quentin Churet
12/04/2024, 3:35 PMMarvin
12/04/2024, 3:35 PMQuentin Churet
12/04/2024, 3:35 PMQuentin Churet
12/04/2024, 3:36 PMQuentin Churet
12/04/2024, 3:38 PMMarvin
12/04/2024, 3:38 PMQuentin Churet
12/04/2024, 3:44 PMMarvin
12/04/2024, 3:44 PMjson
{
"trigger": {
"type": "flow_run_state",
"state": "FAILED"
},
"filters": [
{
"field": "deployment_name",
"operator": "starts_with",
"value": "prod-"
}
],
"actions": [
{
"type": "notify",
"message": "Flow run failed for deployment: {{ deployment_name }}"
}
]
}
### Explanation:
- Trigger: Listens for any flow run state changes and specifically looks for flow runs that have failed.
- Filters: Ensure that only deployments with names starting with "prod-" are considered. Adjust the field
to match your deployment naming convention.
- Actions: Here, an example action is provided to send a notification message when a flow run fails. You can customize this to fit what exactly you'd like to happen, like sending an email or integrating with a monitoring tool.
This JSON structure is a conceptual template. Depending on how Prefect Cloud's automation setup is structured, you may need to adjust this for your specific setup. It's ideal for capturing the logic and conditions you want to apply in your automation.
If you need further assistance, especially on integrating with specific systems or more advanced configurations, just let me know!