Skip to main content
These events are only available in Prefect Cloud.
Flow archival events describe changes to a flow’s visibility and eligibility for automatic archival. For run state transitions, see Flow run events. For setup instructions, see Archive and restore flows.

prefect.flow.archived

Emitted when a flow changes from unarchived to archived, whether through the UI, API, a bulk operation, or an automation. Archiving an already archived flow does not emit an event. A bulk operation emits one event for each flow whose state changes.

Resource

Related resources identify the actor that performed the action, the account, and the workspace, with roles actor, account, and workspace.

Payload

The payload describes the flow after the change.

prefect.flow.unarchived

Emitted when a flow changes from archived to unarchived, including restoration by a workspace policy. Unarchiving a flow that is not archived does not emit an event. The resource, related resources, and payload fields are the same as for prefect.flow.archived, except archived is false and archived_at is null. Archive and unarchive operations emit these specific events instead of an additional prefect.flow.updated event.

prefect.flow.dormant

Emitted when Prefect Cloud identifies an unarchived flow that meets the workspace’s dormancy criteria. The automation created by the Dormant flow archival policy responds with an archive action. This event describes eligibility; it does not confirm that archival succeeded. Use prefect.flow.archived to observe the completed change. Dormant events are emitted only in workspaces with Dormant flow archival enabled. Prefect Cloud checks daily and schedules events for up to 50 eligible flows per workspace, spread across the day. It checks eligibility again before emitting each event. A flow can produce another event on a later day if it remains dormant and unarchived, at most once per day per flow.

Resource

This event has no related resources.

Payload