Step: User Approval
- Key:
user-approval - Category: Workflow Control
- Description: Pause Flow execution and wait for an approve or reject decision.
Inputs
message(long-text, required): Approval message shown to the user. Template variables are supported.
Resume Context
When the user decides, the Flow resumes with an approval object in context:
approval.decision:approveorreject.approval.decidedAt: Decision timestamp.approval.decidedBy: User name when available.approval.message: Approval message shown during the pause.
Branching
- Approve follows the step's default
nextStepId. - Reject follows
rejectNextStepIdwhen configured. If no reject branch is configured, reject falls back to the defaultnextStepId.
Outputs
The step definition exposes these approval fields for downstream use:
decision(string): User decision.decidedAt(date): Decision time.decidedBy(string): User who made the decision.
In practice, use the approval.* context values after resume.
Notes
- This step intentionally interrupts execution with a waiting state.
- Programmatic executions can resume the waiting run with
POST /v1/flowrun/resume/:appRunIdand a body such as{ "decision": "approve" }. - Peer/chat executions normally resume through the message approval UI.
Example
text
Message: Approve sending the quote for { {totalAmount} } to { {customer.email} }?
Approve branch: send email
Reject branch: final response saying the quote was not sent
