Skip to main content
Flow run events track the lifecycle of every flow run, from scheduling through completion. They are emitted on every state transition and, optionally, as periodic heartbeats during execution.

prefect.flow-run.{state}

Emitted each time a flow run transitions to a new state. The {state} suffix is the state name (for example, prefect.flow-run.Running or prefect.flow-run.Completed).

State variants

Resource

Archived flow label (Prefect Cloud)

In Prefect Cloud, state-transition events emitted for an archived flow include "prefect.flow.archived": "true" on the related resource with role flow. The label is absent when the flow is not archived. Its value is the string "true", not a JSON boolean. For example, the related flow resource can contain:
Use this label in an event trigger’s match_related filter to match runs of archived flows. The automation created by the Archived flow restoration policy matches this label on prefect.flow-run.Scheduled, prefect.flow-run.Pending, and prefect.flow-run.Running events.

Payload

prefect.flow-run.heartbeat

Emitted periodically during flow run execution when heartbeat frequency is configured. Used for liveness detection, particularly with zombie flow detection.

Resource

Payload

This event has no payload.