Wait for Approval
flow.approval Logic v0.1.0 Pauses the run until a human approves or rejects, then routes the input (plus the decision) out the matching port.
Ports
| Direction | Port | Label |
|---|---|---|
| Input | input | Input |
| Output | approved | Approved |
| Output | rejected | Rejected |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Titletitle | string | "Approval required" | What is being approved — shown to the approver. |
Descriptiondescription | string | "" | Optional extra context for the approver. |
Timeout (ms)timeoutMs | int | 0 | How long to wait for a decision. 0 = wait forever. Pending approvals are in-memory — a process restart loses them. |
On timeoutonTimeout | select | "reject" | What happens when the timeout elapses: route to Rejected, route to Approved (decision "timeout" either way), or fail the node with APPROVAL_TIMEOUT (catchable by a Try). rejectapproveerror |
Examples
Gate an order behind a human decision (the shipped demo)
{
"id": "gate",
"type": "flow.approval",
"config": {
"title": "Approve order?",
"description": "A new order needs a human decision before it ships.",
"timeoutMs": 0,
"onTimeout": "reject"
}
}
Wire approved and rejected to their consequences — in the demo, HTTP Response nodes
answering the original webhook caller with 202 or 403:
[
{ "sourceNodeId": "gate", "sourcePort": "approved", "targetNodeId": "ok", "targetPort": "input" },
{ "sourceNodeId": "gate", "sourcePort": "rejected", "targetNodeId": "deny", "targetPort": "input" }
]
Auto-approve quiet hours
timeoutMs: 3600000 with onTimeout: "approve" — if nobody objects within the hour, the run
proceeds. onTimeout: "error" instead routes expiry into the workflow’s
recovery lane.
Tips
- Where decisions happen: the fleet-wide inbox in the Nucleus header (every pending gate on every authorized host), the host dashboard’s pending-approvals panel, or inline in Studio for test runs. The decider’s name and optional note are recorded.
- The card shows your
titleanddescriptionverbatim — write them for the person deciding, not for the developer. - Deciding requires the executor role; viewers see the inbox read-only.
- Pending gates live in the app’s process and don’t survive an app restart — see the approvals guide.
This page is generated from the node registry by gen-node-docs.mjs on every
site build — ports, properties, defaults and visibility rules cannot drift from the code.
The examples above are hand-authored and merged in.