Events can represent API calls, state transitions, or changes in your execution environment or infrastructure. Events power several Prefect features, including flow run logs and automations. In Prefect Cloud, events power audit logs.Documentation Index
Fetch the complete documentation index at: https://docs.prefect.io/llms.txt
Use this file to discover all available pages before exploring further.
Event specification
Events adhere to a structured specification.
| Name | Type | Required? | Description |
|---|---|---|---|
| occurred | String | yes | When the event happened |
| event | String | yes | Name of the event that happened |
| resource | Object | yes | Primary resource this event concerns |
| related | Array | no | List of additional Resources involved in this event |
| payload | Object | no | Open-ended set of data describing what happened |
| id | String | yes | Client-provided identifier of this event |
| follows | String | no | ID of an event that is known to have occurred prior to this one |
Event grammar
Events can be named arbitrarily, but are recommended to follow a consistent and informative grammar. An event describes a resource and an action it took— or that was taken—on that resource. For example, events emitted automatically by Prefect objects take the following form:Resources
Every event has a primary resource, which describes the object that emitted an event. Resources are used as quasi-stable identifiers for sources of events, and are represented as dot-delimited strings. For example:Respond to events
From any event detail page, you can configure an automation to trigger on the observation of matching events—or a lack of matching events—by clicking the automate button in the overflow menu:
Further reading
- Events reference: comprehensive catalog of every event emitted by Prefect, Prefect Cloud, and integrations
- How to create automations
- How to create webhooks