Liliya Angelova
02/19/2026, 12:15 PM{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {},
"after": [],
"expect": [
"prefect.flow-run.Failed",
"prefect.flow-run.TimedOut",
"prefect.flow-run.Crashed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Reactive",
"threshold": 1,
"within": 0
}Marvin
02/19/2026, 12:15 PMMarvin
02/19/2026, 12:18 PMmatch_related. In Prefect 3.x Automations, match targets the primary resource (your flow run), and match_related lets you filter on related resources like the flow or deployment. Negation is supported with a leading !, and wildcards * are allowed.
Two common ways to exclude a single flow:
- Exclude by flow name (recommended if the name is stable):
{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {
"prefect.resource.role": "flow",
"prefect.resource.name": "!your-flow-name"
},
"after": [],
"expect": [
"prefect.flow-run.Failed",
"prefect.flow-run.TimedOut",
"prefect.flow-run.Crashed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Reactive",
"threshold": 1,
"within": 0
}
- Exclude by flow ID (most precise):
{
"type": "event",
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {
"prefect.resource.role": "flow",
"prefect.resource.id": "!prefect.flow.<your-flow-uuid>"
},
"after": [],
"expect": [
"prefect.flow-run.Failed",
"prefect.flow-run.TimedOut",
"prefect.flow-run.Crashed"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Reactive",
"threshold": 1,
"within": 0
}
Notes:
- You can exclude multiple flows with a list, e.g. "prefect.resource.name": ["!flow-a", "!flow-b"].
- If you prefer pattern-based exclusion, wildcards work, e.g. "prefect.resource.name": "!staging-*".
If you’re not sure of the exact labels on your events, open the Event Feed in the UI and inspect a sample flow-run event to confirm the prefect.resource.* fields for the related “flow” resource.