Approval Gate
Configures the approval gate on a task created by a preceding Create Task node.
Partial. Attaches an approval configuration to an existing task so the Tasks inbox opens it with the human approval gate app, then continues at once through accepted; it does not wait for the decision.
How it works
- Resolves the config and merges it over the incoming payload (config wins).
- Reads
task_idfrom the config or the incoming payload, normally the output of the precedinghuman.task.create. - Checks
task_id,approval_type.nameandtitle, then buildshitlas{ approval_type, title, description, ...hitl_config }. - Reads the task from the Work Management API; fails if it does not exist.
- Writes the whole task back with
payload.hitlandexecution{ app_slug: "human-approval-gate", launch_mode: "embedded" }merged into the existing values. - Returns
{ task_id, approval_type, decision: null }throughaccepted.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-approve-refund",
"label": "Approve refund",
"operator_slug": "human.approval.gate",
"operator_version": "1.0.0",
"config": {
"approval_type": {
"id": 1,
"name": "binary_approval",
"title": "Binary Approval",
"color": "#1976d2"
},
"title": "Approve refund for {{ $json.task_title }}",
"description": "Confirm the refund before it is issued.",
"hitl_config": {}
}
}{
"ok": true,
"port": "accepted",
"task_id": "task-xxxxxxxxxxxxxxx",
"approval_type": {
"id": 1,
"name": "binary_approval",
"title": "Binary Approval",
"color": "#1976d2"
},
"decision": null
}Configuration
-
approval_typeobject Required -
Binary | Tool | Plan Review | Single-Select | Multi-Select | Review/Edit/Reject
-
titlestring Required Accepts expressions -
Shown to the approver when the task is claimed. Supports expressions like {{ $json.entity_name }}.
-
descriptionstring Optional Accepts expressions -
Context shown to the approver inside the task detail. Supports expressions and multi-line text.
-
hitl_configobject Optional -
Subtype-specific fields (tool, plan, options, content, min_selection, etc.)
Its configuration shows the shared execution settings, but this node does not apply retries (retryOnFail, maxTries) yet. continueOnFail is not applied by any node.
Behaviour in the code
What the implementation does with these keys beyond what the schema says.
-
approval_type - One of
binary_approval(1),tool_approval(2),plan_review(3),single_select_decision(4),multi_select_decision(5),review_edit_reject(6), as{ id, name, title, color }. -
hitl_config - Spread into
hitl, so its keys can overrideapproval_type,titleanddescription. Shapes per type:tool_approval{ tool: { name, args, risk_level } };plan_review{ plan: { steps: [{ id, title, detail }] } }; select types{ options: [{ id, name, title }] };review_edit_reject{ content: { text, editable } }.
Output ports
accepted default The gate was configured on the task. It does not mean anyone approved.
{
"port": "accepted",
"task_id": "task-xxxxxxxxxxxxxxx",
"approval_type": {
"id": 1,
"name": "binary_approval",
"title": "Binary Approval",
"color": "#1976d2"
},
"decision": null
}rejected Never emitted: the worker does not wait for the decision.
timeout Never emitted.
error Missing inputs, task not found or the backend call failed.
{
"port": "error",
"error": "Missing 'approval_type' or invalid approval type object"
}In expressions
What a later node can read from this node's output with $("Approval Gate").item.json.<path> (write your node's label instead of Approval Gate). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through accepted, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Approval Gate").item.json.task_id | ||
$("Approval Gate").item.json.approval_type | ||
$("Approval Gate").item.json.decisionThe actual human decision. Populated when suspend/resume is implemented; null in the current fire-and-forget mode. | ||
$("Approval Gate").item.json.selectedPopulated for single_select / multi_select approval types. | — | |
$("Approval Gate").item.json.edited_contentPopulated when the approver edited plan steps or review content before approving. | — | |
$("Approval Gate").item.json.comment | — | |
$("Approval Gate").item.json.approver | — | |
$("Approval Gate").item.json.port | — | |
$("Approval Gate").item.json.approval_type.id | — | |
$("Approval Gate").item.json.approval_type.name | — | |
$("Approval Gate").item.json.approval_type.title | — | |
$("Approval Gate").item.json.approval_type.color | — |
— Editor: The editor suggests it, but the worker does not return it: it reads as undefined.
— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).
Errors
| Message | Port | Cause and fix |
|---|---|---|
Missing 'task_id'. This node must be chained after a Human Task Create node. If you are testing with 'Execute step', run the preceding Create Task node first or provide sample data that includes task_id. | error | No task_id in the config or the payload. |
Missing 'approval_type' or invalid approval type object | error | approval_type is missing or has no name. |
Missing 'title' | error | title is empty after resolving expressions. |
Task '<task_id>' not found. Cannot configure approval gate on a non-existent task. | error | The task id does not exist in Work Management. |
Backend rejected the update | error | The update answered without success; the backend message is used when present. |
Request failed with status code <status> | error | The backend rejected the read or the update. |
services.apiManager.uri is not resolved in dependencies.config — check Link Loom Cloud environment config. | error | The orchestrator has no backend address configured. This is a service configuration problem, not a node problem. |
Input contract
-
task_idstring Optional -
Propagated from preceding Create Task node
-
approval_typeobject Optional -
titlestring Optional -
descriptionstring Optional -
hitl_configobject Optional
Output contract
-
task_idstring Optional -
approval_typeobject Optional -
decisionstring Optional -
The actual human decision. Populated when suspend/resume is implemented; null in the current fire-and-forget mode.
-
selectedarray Optional -
Populated for single_select / multi_select approval types.
-
edited_contentobject Optional -
Populated when the approver edited plan steps or review content before approving.
-
commentstring Optional -
approverstring Optional
Contracts (JSON Schema)
The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.
{
"slug": "human.approval.gate",
"name": "Approval Gate",
"category": "hitl",
"version": "1.0.0",
"description": "Configures the approval gate on a task created by a preceding Create Task node. Writes payload.hitl + execution.app_slug via PATCH to the backend.",
"capabilities": [
"approval",
"gate",
"human"
],
"config_schema": {
"type": "object",
"required": [
"approval_type",
"title"
],
"properties": {
"approval_type": {
"type": "object",
"title": "Approval Type",
"ui_widget": "hitl_approval_type_picker",
"description": "Binary | Tool | Plan Review | Single-Select | Multi-Select | Review/Edit/Reject"
},
"title": {
"type": "string",
"title": "Title",
"format": "expression",
"description": "Shown to the approver when the task is claimed. Supports expressions like {{ $json.entity_name }}."
},
"description": {
"type": "string",
"title": "Description",
"format": "expression",
"description": "Context shown to the approver inside the task detail. Supports expressions and multi-line text."
},
"hitl_config": {
"type": "object",
"title": "Approval configuration",
"ui_widget": "hitl_config",
"ui_options": {
"depends_on": "approval_type"
},
"description": "Subtype-specific fields (tool, plan, options, content, min_selection, etc.)"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
},
"input_contract_schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Propagated from preceding Create Task node"
},
"approval_type": {
"type": "object"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"hitl_config": {
"type": "object"
}
}
},
"output_contract_schema": {
"type": "object",
"properties": {
"task_id": {
"type": "string"
},
"approval_type": {
"type": "object"
},
"decision": {
"type": "string",
"enum": [
"approved",
"rejected",
"edited",
"timeout"
],
"description": "The actual human decision. Populated when suspend/resume is implemented; null in the current fire-and-forget mode."
},
"selected": {
"type": "array",
"description": "Populated for single_select / multi_select approval types."
},
"edited_content": {
"type": "object",
"description": "Populated when the approver edited plan steps or review content before approving."
},
"comment": {
"type": "string"
},
"approver": {
"type": "string"
}
}
},
"ports": [
{
"port_id": "accepted",
"label": "Accepted",
"is_default": true,
"description": "Emitted when the approver confirms the action (Approve / Allow / Confirm / Submit edits)."
},
{
"port_id": "rejected",
"label": "Rejected",
"description": "Emitted when the approver denies or cancels (Reject / Deny / Cancel)."
},
{
"port_id": "timeout",
"label": "Timeout",
"description": "Emitted when the task expires without a decision (SLA breached)."
},
{
"port_id": "error",
"label": "Error",
"description": "Emitted on technical failures during approval gate configuration."
}
],
"chain_constraints": {
"prev": {
"required_slug": "human.task.create",
"message": "Human Approval Gate requires a preceding Create Task node to receive the task_id."
}
},
"execution_mode": "sync",
"tags": [
"approval",
"gate",
"human",
"hitl"
],
"is_stateful": false,
"publisher": {
"identity": "org_sommatic_ai",
"profile": {
"name": "Sommatic AI",
"verified": true,
"url": "https://me.veripass.com/sommatic",
"logo_url": null
}
}
}{
"type": "object",
"required": [
"approval_type",
"title"
],
"properties": {
"approval_type": {
"type": "object",
"title": "Approval Type",
"ui_widget": "hitl_approval_type_picker",
"description": "Binary | Tool | Plan Review | Single-Select | Multi-Select | Review/Edit/Reject"
},
"title": {
"type": "string",
"title": "Title",
"format": "expression",
"description": "Shown to the approver when the task is claimed. Supports expressions like {{ $json.entity_name }}."
},
"description": {
"type": "string",
"title": "Description",
"format": "expression",
"description": "Context shown to the approver inside the task detail. Supports expressions and multi-line text."
},
"hitl_config": {
"type": "object",
"title": "Approval configuration",
"ui_widget": "hitl_config",
"ui_options": {
"depends_on": "approval_type"
},
"description": "Subtype-specific fields (tool, plan, options, content, min_selection, etc.)"
},
"execution": {
"type": "object",
"title": "Execution Settings",
"properties": {
"alwaysOutputData": {
"type": "boolean",
"title": "Always Output Data",
"description": "Always output data, even on error (if configured).",
"default": false
},
"retryOnFail": {
"type": "boolean",
"title": "Retry On Fail",
"description": "Retry the execution if it fails.",
"default": false
},
"maxTries": {
"type": "integer",
"title": "Max Retries",
"description": "Number of retries.",
"default": 3,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"waitBetweenTries": {
"type": "integer",
"title": "Wait Between Retries (ms)",
"default": 1000,
"displayOptions": {
"show": {
"retryOnFail": [
true
]
}
}
},
"continueOnFail": {
"type": "boolean",
"title": "Continue On Fail",
"description": "Do not crash workflow on error.",
"default": false
},
"timeout_ms": {
"type": "integer",
"title": "Timeout (ms)",
"description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
"default": 300000
}
}
}
}
}{
"type": "object",
"properties": {
"task_id": {
"type": "string",
"description": "Propagated from preceding Create Task node"
},
"approval_type": {
"type": "object"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"hitl_config": {
"type": "object"
}
}
}{
"type": "object",
"properties": {
"task_id": {
"type": "string"
},
"approval_type": {
"type": "object"
},
"decision": {
"type": "string",
"enum": [
"approved",
"rejected",
"edited",
"timeout"
],
"description": "The actual human decision. Populated when suspend/resume is implemented; null in the current fire-and-forget mode."
},
"selected": {
"type": "array",
"description": "Populated for single_select / multi_select approval types."
},
"edited_content": {
"type": "object",
"description": "Populated when the approver edited plan steps or review content before approving."
},
"comment": {
"type": "string"
},
"approver": {
"type": "string"
}
}
}[
{
"port_id": "accepted",
"label": "Accepted",
"is_default": true,
"description": "Emitted when the approver confirms the action (Approve / Allow / Confirm / Submit edits)."
},
{
"port_id": "rejected",
"label": "Rejected",
"description": "Emitted when the approver denies or cancels (Reject / Deny / Cancel)."
},
{
"port_id": "timeout",
"label": "Timeout",
"description": "Emitted when the task expires without a decision (SLA breached)."
},
{
"port_id": "error",
"label": "Error",
"description": "Emitted on technical failures during approval gate configuration."
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
approvalgatehuman- Tags
approvalgatehumanhitl
Notes and limits
- Not implemented: suspending the run and routing the decision.
decisionis alwaysnull;selected,edited_content,commentandapproverfrom the output contract are never returned;rejectedandtimeoutnever fire. - The update is a read-modify-write of the whole task: changes made to the task between the read and the write are overwritten. The task status is not changed.
- The worker returns its fields at the top level of the envelope, without
data, so the engine uses the whole envelope (including theportkey) as the payload of the next node. - The worker does not set
ok(the example showstrue); the engine routes only byport.
Reviewed against the orchestrator code · 31e874b · 2026-11-26