Billy McMonagle
07/31/2026, 5:53 PMMarvin
07/31/2026, 5:53 PMNate
07/31/2026, 5:55 PMMarvin
07/31/2026, 5:55 PMprefect.flow-run.Failed
- prefect.flow-run.Crashed
it will not fire for a flow run that ends in TimedOut.
Why:
- TimedOut has a FAILED state type
- but its state name is TimedOut
- automation events are emitted from the state name, so the event is prefect.flow-run.TimedOut
So if you want to catch timeouts too, include it explicitly:
yaml
expect:
- prefect.flow-run.Failed
- prefect.flow-run.Crashed
- prefect.flow-run.TimedOut
Relevant docs:
- Prefect states documentation
If you want, I can also help you translate that into the exact automation UI config or JSON/YAML you're using.Billy McMonagle
07/31/2026, 5:57 PMAutomationTrigger(
event=AutomationTriggerEvent(
posture='Reactive',
threshold=1,
within=0,
expect=['prefect.flow-run.Failed', 'prefect.flow-run.Crashed'],
match=dumps(
{
'prefect.resource.id': 'prefect.flow-run.*',
}
),
match_related=dumps(
{
'prefect.resource.id': f'prefect.tag.{SLACK_NOTIFICATION_TAG_PREFIX}:*',
'prefect.resource.role': 'tag',
}
),
)
),