Queue
A node that makes an execution wait a set number of seconds and then lets it carry on.
5 min read
Queue delays a flow. An execution that reaches the node stops, waits the number of seconds you set, and then carries on along the same path.
- Node
- Queue
- Type
queue- Category
- Output
- Ports
- Default
defaultmust be connected
- Default
- Ends the path
- No
What it does
When an execution reaches the node, it stops there, and its status becomes waiting. Slen stores what the execution has gathered so far. The request that started the execution is answered at once with 202, and the answer names the node and the moment the wait ends.
{
"data": {
"execution_id": "74438200973594800",
"status": "waiting",
"operation": "summarize_report",
"output": null,
"error": null,
"error_code": null,
"error_message": null,
"cost": { "estimated": null, "actual": null },
"cache": { "hit": false, "cached_at": null },
"replayed": false,
"waiting_on": {
"node_key": "wait",
"type": "queue_node",
"resume_at": "2026-10-02T09:35:00+00:00"
},
"trace_url": "/v1/executions/74438200973594800",
"retry_after_seconds": 300
}
}An execution that was started in async mode has been answered earlier, with queued. Its status turns waiting when it reaches the node.
When the moment comes, the execution continues from the same node. It leaves through Default and goes on to the next node. Waiting executions are picked up once a minute, so the wait is never shorter than the delay and usually ends within a minute after it.
The node waits once. It is a delay and not a loop.
Nothing is reserved while the execution waits. AI Model reserves money when the execution reaches it. A model that stands after the node is reserved for and called after the delay, against the budgets as they are at that moment.
When to use it
Use the node to put a spend off. The execution waits, and the model is called after the delay.
The caller has to be ready for an answer that is not final. Async runs and waiting shows how an application waits for the result.
The node does not put executions in order and does not limit how many run at once. Each execution waits its own delay.
To wait for a person's decision, use Require Approval.
On the Executions tab of the flow an execution that stands at the node is shown as Waiting. Inspect an execution shows how to watch the executions that wait on the canvas of the flow.
Settings
| Setting | What it is for |
|---|---|
delay_seconds | How long the execution waits at the node, in whole seconds. At least 1. A node without a value waits 60 seconds. |
In the builder the setting is the field Wait for (seconds). A new node starts with 60.
The longest delay is 255,600 seconds, which is 71 hours, by default. A longer delay is refused when the flow is published.
Ports
The node has one port, Default, and it is required. A flow in which this port leads nowhere is not published. The execution leaves through it when the wait is over.
Ports and branching says what a required port is.
Output
After the wait the node leaves one field for the nodes that follow.
{ "queued_for_seconds": 300 }queued_for_seconds is the delay the node is set to, not the time that passed. A later node reads it by the path nodes.<key>.output.queued_for_seconds, where <key> is the key of this node in the flow.
Errors
The node raises no error of its own. Its setting is 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.
| Check | Message in the builder |
|---|---|
queue_invalid_delay | The delay of “{node}” must be a whole number of seconds, at least 1. |
queue_delay_too_long | The delay of “{node}” is longer than a waiting execution is kept: at most {max} seconds. |
The node may not stand after Reserve Budget and before the AI Model it reserves for, because a waiting execution holds no reservation. Such a flow is not published.
An execution may wait 72 hours in all by default. The time is counted from its first pause, and for an execution sent in async mode — from the moment it was accepted. Past that the execution is closed as failed, and its status says why.
{
"status": "failed",
"error_code": "parked_expired",
"error_message": "The execution waited longer than a parked execution may and was closed"
}An error that happens after the wait is not answered to the request that started the execution, because that request has been answered already. Read the status of the execution, or subscribe to the execution.finished webhook.
Example
- Request — Default → Queue
- Queue — Default → AI Model
- AI Model — Success → Return Response
The request is answered with waiting as soon as the execution reaches Queue. After the delay AI Model reserves money and calls the model, and Return Response ends the execution as completed. The application reads the result by the id of the execution.
Related
Async runs and waiting — how an application waits for an execution that answered
waiting.Ports and branching — required ports and where a port leads.
How a flow is built — every node of the builder and the groups of the palette.
Pauses, queues and resuming — what an execution keeps and holds while it waits, and how long it may wait.
Require Approval — wait for a person's decision instead of a set time.
Built from openapi b070e1f, sdk contract 6a2e0e0, php 4089db3, node 0fa87be