Loopfour
Execution

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 StateMeaning
runningExecuting steps normally
suspendedPaused, waiting for an approval decision or external event
completedResumed and finished successfully
failedA step failed, or the request was rejected on a fail path

The Approval Lifecycle

  1. Reach the block -- the run reaches an Approval block and suspends
  2. Notify -- an interactive request is posted to the configured Slack channel with approve/reject buttons
  3. Wait -- the run remains suspended (optionally with a timeout)
  4. Decision -- an authorized approver approves or rejects
  5. 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:

OptionTypeDescription
titlestringTitle shown in the approval request
descriptionstringContext about what is being approved (supports templates)
notifyChannelstringSlack channel for the request
approversarrayUsers authorized to approve
timeoutHoursnumberAuto-reject after this many hours (optional)

The block outputs the decision so downstream steps can branch on it:

OutputTypeDescription
approvedbooleanWhether the request was approved
approvedBystringName/email of the approver
approvedAtstringTimestamp of the decision
commentstringOptional 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 timeoutHours is 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.

Frequently Asked Questions

Next Steps

On this page