Require Approval

A node that stops an execution until a person approves or rejects it, and sends it on along the branch of the decision.

4 min read

Require Approval stops an execution until a person decides on it. An approval sends the execution on through Approved, and a rejection — or no decision in time — through Rejected.

Node
Require Approval
Type
require_approval
Category
Money
Ports
  • Approved approved must be connected
  • Rejected rejected must be connected
Ends the path
No

What it does

When an execution reaches the node, Slen files a request for approval with the note of the node and the time by which it has to be decided, and sends the webhook event approval.requested. The execution stops at the node, and its status becomes waiting.

The request that started the execution is answered at once with 202. In the answer waiting_on names the node, its type is approval, and resume_at is null: a decision moves the execution, not a clock. An execution that was started in async mode has been answered earlier, and its status turns waiting when it reaches the node.

A member decides on Approvals, or an API key decides over the API — Approvals. Within a minute after the decision the execution continues from the node:

  • approved — through Approved;

  • rejected — through Rejected;

  • not decided in time — the request becomes expired, and the execution leaves through Rejected as if it had been rejected.

Nothing is held while the execution waits. A model call after the node is estimated and held when the execution reaches it, after the decision, against the budgets as they are then.

When to use it

  • To let a person approve a spend before it happens — a large job, an expensive model, a request of a customer you watch.

  • Put a Condition before the node so that only the requests that need a decision wait for one. The template Request approval does that — AI flow templates.

  • To be told of a request without opening the console, subscribe to approval.requested and approval.decided — Webhooks.

  • To delay an execution by a fixed time without a person, use Queue.

A request on Approvals can also come without this node, from an AI Model node whose overrun policy asks a person to approve a call that came out dearer than its hold. A rejection, or no decision within 24 hours, refuses the call with overrun_stopped, and the execution leaves the model node through Deny. A new model node has no overrun policy, and a policy that a node has practically never fires — Approvals, AI Model.

Settings

SettingWhat it is for
expires_hoursHow long a person has to decide, in whole hours. At least 1, and at most 71 by default. Nobody deciding in time counts as a rejection. A node without a value gives 24 hours.
noteThe words the person who decides reads with the request, such as why the spend needs a decision. Optional. The first 500 characters are kept.

In the builder the settings are the fields Decide within (hours) and Note for the decider. A new node gives 24 hours and no note.

The longest time to decide is 71 hours by default: an execution may wait 72 hours in all, and the decision has to come before that. A longer time is refused when the flow is published.

Ports

PortThe execution leaves through it when
ApprovedThe request was approved. Required
RejectedThe request was rejected, or nobody decided in time. Required

A flow in which either port leads nowhere is not published — Ports and branching.

Output

After the decision the node leaves its verdict for the nodes that follow.

JSON
{
  "status": "approved",
  "reason": "Within the quarter plan",
  "approval_id": "74438200973595136",
  "decided_at": "2026-10-02T09:41:00+00:00"
}
  • status is approved, rejected or expired. Both a rejection and an expiry leave through Rejected, so a Condition on that branch tells them apart by nodes.<key>.output.status, where <key> is the key of this node in the flow.

  • reason is what the person wrote with the decision, or null. An expired request says not decided in time.

  • Who decided is not in the output. The webhook event approval.decided names them.

Errors

The node raises no error of its own. Its settings are checked when the flow is validated and when it is published.

In the API an entry of issues names such a check in params.detail; its code is invalid_node_config.

CheckMessage in the builder
require_approval_invalid_expires_hoursThe decision window of “{node}” must be a whole number of hours, at least 1.
require_approval_expires_too_lateThe decision window of “{node}” is longer than a waiting execution is kept: at most {max} hours.

The node may not be reachable from Reserve Budget before a model is reached, along any connection but a Deny branch: an execution that waits holds nothing. Such a flow is not published — The money chain.

A request whose execution was closed before anybody decided — after it waited too long — cannot be decided any more.

Example

  • Request — Default → Require Approval
  • Require Approval — Approved → AI Model
  • Require Approval — Rejected → Reject Request
  • AI Model — Success → Return Response

The request is answered with waiting as soon as the execution reaches Require Approval. After an approval AI Model holds the money and calls the model, and Return Response ends the execution as completed. After a rejection, or when nobody decides in time, Reject Request ends it as rejected, and no money was held.

  • Approvals — decide on a request in the console or over the API.

  • Async runs and waiting — how an application waits for an execution that answered waiting.

  • Queue — wait a fixed time instead of a decision.

Built from openapi b070e1f, sdk contract 5cc7055, php ae4a53b, node 84bc62d