Joshua Caskie
12/02/2025, 7:11 PMMarvin
12/02/2025, 7:11 PMMarvin
12/02/2025, 7:17 PM! prefix (and you can use a trailing wildcard like !prefix-*).
Quick example (edit your automation trigger in the UI’s JSON/YAML editor):
JSON (UI “Edit as JSON”)
{
"type": "event",
"posture": "Reactive",
"expect": [
"prefect.flow-run.Failed"
],
"match": {
"prefect.resource.id": "prefect.flow-run.*",
"prefect.resource.name": [
"!x",
"!y",
"!z"
]
},
"threshold": 1
}
YAML (be sure to quote values that start with “!”)
trigger:
type: event
posture: Reactive
expect:
- prefect.flow-run.Failed
match:
prefect.resource.id: "prefect.flow-run.*"
prefect.resource.name:
- "!x"
- "!y"
- "!z"
threshold: 1
Notes and tips
- You can exclude by prefix: "!debug-*" (only trailing * is supported).
- Values are case-sensitive.
- Within a single label, lists are OR’ed; across labels, conditions are AND’ed.
- If you’re writing YAML, always quote !something to avoid YAML interpreting it as a directive.
- The Prefect CLI currently supports listing/inspecting/pausing/resuming/deleting automations, but not creating them—create/edit via the UI or API.
Docs
- Automations overview: Automations
- Event triggers and matching: Event triggers and matching