Step: End Session
- Key:
end-session - Category: Workflow Control
- Description: End the active conversation session from a Flow.
Inputs
reason(text, optional): Reason stored on the ended session. Defaults toflow_completed.
Outputs
success(boolean): Whether an active session was ended.message(string): Success or no-session message when available.sessionId(string): Ended session ID when a session was found.endReason(string): Reason stored on the session.endedAt(date): Time the session was ended.conversationId(string): Conversation ID used to locate the active session.error(string): Error message when the step fails.
Notes
- This step needs
conversationIdin the flow context. Peer-triggered and message-tied executions provide it. - If no active conversation/session exists, the step returns
success: falseinstead of producing a final message. - A new session can start automatically when the user sends a later message, depending on the channel and session configuration.
- Combine with a
finalstep when you also need to return a visible closing response.
Example Use Case
- Flow completes a support handoff or booking workflow.
end-sessionruns withreason = "task_finished".- A
finalstep returns the closing response to the user.

