Approval Flows
Human-in-the-loop workflow execution
Some workflows need a human decision before continuing -- approving a high-value invoice, authorizing a discount, or signing off on a sensitive operation. Approval flows pause a run, wait for a person to approve or reject, then resume along the chosen path. This is implemented with the Approval block.
How Suspension Works
When a run reaches an Approval block, the execution engine moves it into the suspended state and stops advancing downstream steps. A notification with approve/reject actions is sent to the configured channel. The run stays suspended -- consuming no compute -- until an authorized approver acts or the optional timeout expires.
| Run State | Meaning |
|---|---|
running | Executing steps normally |
suspended | Paused, waiting for an approval decision or external event |
completed | Resumed and finished successfully |
failed | A step failed, or the request was rejected on a fail path |
The Approval Lifecycle
- Reach the block -- the run reaches an Approval block and suspends
- Notify -- an interactive request is posted to the configured Slack channel with approve/reject buttons
- Wait -- the run remains
suspended(optionally with a timeout) - Decision -- an authorized approver approves or rejects
- Resume -- the engine resumes the run along the approved or rejected path
A suspended run does not count against execution time. It can wait for minutes or days depending on your timeout configuration.
Configuring an Approval
Approval behavior is configured on the Approval block:
| Option | Type | Description |
|---|---|---|
title | string | Title shown in the approval request |
description | string | Context about what is being approved (supports templates) |
notifyChannel | string | Slack channel for the request |
approvers | array | Users authorized to approve |
timeoutHours | number | Auto-reject after this many hours (optional) |
The block outputs the decision so downstream steps can branch on it:
| Output | Type | Description |
|---|---|---|
approved | boolean | Whether the request was approved |
approvedBy | string | Name/email of the approver |
approvedAt | string | Timestamp of the decision |
comment | string | Optional approver comment |
Resuming Suspended Runs
A suspended run resumes when:
- An approver acts -- clicking Approve or Reject in Slack resumes the run along the matching path
- The API is called -- approvals can be resolved programmatically via the REST API for custom approval UIs
- The timeout expires -- if
timeoutHoursis set, the request is auto-rejected and the run resumes on the rejected path
Without a timeout, a suspended run waits indefinitely. Set timeoutHours for time-sensitive workflows so runs cannot hang when an approver is unavailable.
Example
High-value invoice approval before finalizing:
Stripe (create invoice) -> Condition (amount > $5,000?)
-> True: Approval (finance manager review)
-> Approved: Stripe (finalize and send)
-> Rejected: Slack (notify requester)
-> False: Stripe (finalize and send)Best Practices
- Set timeouts. Prevent runs from hanging when approvers are away.
- Include context in the description. Use template variables to show amounts, customer names, and details so approvers can decide without leaving Slack.
- Notify via Slack for speed. Interactive Slack requests get faster responses than email.
- Chain blocks for multi-level approval. The block resolves on the first authorized decision; chain multiple Approval blocks for tiered sign-off.
Loopfour