Flow Completion Events
React to completed flow executions for chaining and monitoring
Flow completion events fire when a flow (script) finishes execution. These events enable flow chaining, execution monitoring, and error alerting.
Event Types
flow.complete
The flow.complete event fires when any flow finishes execution, whether successful or failed. This event includes execution metadata, timing, and output data, making it useful for chaining flows together or monitoring automation health.
Event Type:
Fields:
content.text(string)Flow completion summary.
flow.flowId(string)ID of the flow that completed.
flow.flowTitle(string)Human-readable flow title.
flow.flowType('user' | 'system')Whether this is a user-created or system flow.
flow.scriptId(string | null)Script ID if the flow used a script. Null for scriptless flows.
flow.scriptName(string | null)Script name if applicable.
flow.executionId(string)Unique execution identifier for this run.
flow.durationMs(number)Execution duration in milliseconds.
flow.tokensConsumed(number)Number of LLM tokens consumed during execution.
flow.success(boolean)True if the flow completed successfully, false if it errored.
flow.errorMessage(string | null)Error message if the flow failed. Null on success.
flow.triggeredBy(object)What triggered this flow execution.
Field Type Description type'event' | 'schedule' | 'manual' How the flow was triggered eventTypestring | undefined Source event type if triggered by an event (e.g., 'call.ended')sourceEventIdstring | undefined ID of the triggering event data(FlowOutputData)Output data from the flow execution. Structure depends on the flow type.
Example - Flow Chain:
Example - Error Monitor:
Example - Execution Logger:
Subscription Examples:
See Also
- Events Overview - Event system architecture
- Creating Scripts - Script configuration