You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
In Prefect 3, Automations and Deployment triggers can target custom flow state names — not just generic state types. When a flow run enters a Completed state with a custom name, the emitted event name reflects that custom name and can be matched by a DeploymentEventTrigger (or EventTrigger) via the expect field.
Key points
A flow run that returns Completed(name="CustomCompleted") emits an event named prefect.flow-run.CustomCompleted
This enables highly specific orchestration patterns: downstream deployments/actions can trigger only on that custom completion, and not on generic Completed events
Triggers can combine:
expect: the custom event name (e.g., {"prefect.flow-run.CustomCompleted"})
If helpful, we can add a small note or example in the docs clarifying that custom-named Completed states emit events with the custom name (prefect.flow-run.) so users can target them precisely in automations.
This discussion was automatically created by the Marvin bot to preserve valuable community insights.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
This discussion was created from a Slack thread conversation.
Original Thread: https://prefect-community.slack.com/archives/C04DZJC94DC/p1762464628241689
Summary
In Prefect 3, Automations and Deployment triggers can target custom flow state names — not just generic state types. When a flow run enters a Completed state with a custom name, the emitted event name reflects that custom name and can be matched by a DeploymentEventTrigger (or EventTrigger) via the expect field.
Key points
Minimal, runnable example
Observed behavior (example)
Notes
Related docs
If helpful, we can add a small note or example in the docs clarifying that custom-named Completed states emit events with the custom name (prefect.flow-run.) so users can target them precisely in automations.
This discussion was automatically created by the Marvin bot to preserve valuable community insights.
Beta Was this translation helpful? Give feedback.
All reactions