Workflow Chain Receiver
Receives execution requests from another workflow's Chain node.
Entry node for sub-workflows called by workflow.chain. It optionally restricts which workflows may call it, then outputs the data sent by the caller together with chain_context.
This trigger acts as the entry point for a workflow that is invoked by another workflow via the workflow.chain node. It enables peer-to-peer workflow chaining without creating a parent-child hierarchy.
Features:
- Caller Filtering: Optionally restrict which workflows can chain into this one.
- Payload Passthrough: The calling workflow's payload is available as
$jsonin downstream nodes. - Traceability: Chain context (caller instance, node, correlation ID) is preserved for audit.
Use Cases:
- Modular workflow composition (e.g., shared validation workflow invoked by multiple callers).
- Event-driven chaining where Workflow A completes a phase and delegates to Workflow B.
- Reusable sub-processes that remain independently testable and deployable.
How it works
- What starts it: a
workflow.chainnode in another workflow. The backend runs the draft when the caller is itself a draft run (test) and the default published version when the caller runs a published version (prod);prodfails when this workflow has no published version. The run's input is{ data, chain_context }. - Resolves the node config. When
accepted_caller_idsis not empty andchain_context.caller_flow_definition_idis not in it, returnserror. - Otherwise spreads
dataat the root, addschain_contextand returnsmetawith the caller's definition id, slug, instance id and the chain's correlation id.
In a workflow
The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.
{
"node_id": "node-from-parent",
"label": "Called by order intake",
"operator_slug": "workflow.trigger",
"operator_version": "1.0.0",
"config": {
"accepted_caller_ids": [
"<flow_definition_id>"
]
}
}{
"ok": true,
"data": {
"order_id": "ord_123",
"customer_email": "[email protected]",
"chain_context": {
"caller_flow_definition_id": "<flow_definition_id>",
"caller_flow_instance_id": "<flow_instance_id>",
"caller_flow_slug": "order-intake",
"caller_node_id": "node-call-billing",
"correlation_id": "chain-8f2k1m9x0q4w7e3r5t6y",
"root_flow_instance_result_id": "<flow_instance_result_id>"
}
},
"port": "out",
"meta": {
"caller_flow_definition_id": "<flow_definition_id>",
"caller_flow_slug": "order-intake",
"caller_flow_instance_id": "<flow_instance_id>",
"correlation_id": "chain-8f2k1m9x0q4w7e3r5t6y"
}
}Configuration
-
accepted_caller_idsarray<string> Optional -
Select which workflows are allowed to invoke this one. Leave empty to accept calls from any workflow.
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.
-
accepted_caller_ids - Matched against
chain_context.caller_flow_definition_id(workflow definition ids, not slugs). Empty accepts every caller.
Output ports
out default The caller is accepted.
{
"order_id": "ord_123",
"customer_email": "[email protected]",
"chain_context": {
"caller_flow_definition_id": "<flow_definition_id>",
"caller_flow_instance_id": "<flow_instance_id>",
"caller_flow_slug": "order-intake",
"caller_node_id": "node-call-billing",
"correlation_id": "chain-8f2k1m9x0q4w7e3r5t6y",
"root_flow_instance_result_id": "<flow_instance_result_id>"
}
}error The caller is not in accepted_caller_ids. The output is the envelope { ok, errors, port, meta: { rejected_caller_id, rejected_caller_slug } }.
{
"ok": false,
"errors": [
"Caller workflow 'order-intake' is not in the accepted callers list"
],
"port": "error",
"meta": {
"rejected_caller_id": "<flow_definition_id>",
"rejected_caller_slug": "order-intake"
}
}In expressions
What a later node can read from this node's output with $("Workflow Chain Receiver").item.json.<path> (write your node's label instead of Workflow Chain Receiver). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.
| Expression | Editor | Worker |
|---|---|---|
$("Workflow Chain Receiver").item.json.dataThe chain input data. | — | |
$("Workflow Chain Receiver").item.json.chain_contextTraceability metadata from the caller. | ||
$("Workflow Chain Receiver").item.json.chain_context.caller_flow_definition_id | ||
$("Workflow Chain Receiver").item.json.chain_context.caller_flow_instance_id | ||
$("Workflow Chain Receiver").item.json.chain_context.caller_flow_slug | ||
$("Workflow Chain Receiver").item.json.chain_context.caller_node_id | ||
$("Workflow Chain Receiver").item.json.chain_context.correlation_id | ||
$("Workflow Chain Receiver").item.json.order_id | — | |
$("Workflow Chain Receiver").item.json.customer_email | — | |
$("Workflow Chain Receiver").item.json.chain_context.root_flow_instance_result_id | — |
— 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 |
|---|---|---|
Caller workflow '<caller_flow_slug or caller_flow_definition_id>' is not in the accepted callers list | error | Add the caller's workflow definition id to accepted_caller_ids, or leave the list empty to accept any caller. A run started without chain_context (for example by hand) is also rejected when the list is not empty. |
Output contract
-
dataobject Optional -
The chain input data.
-
chain_contextobject Optional -
Traceability metadata from the caller.
-
caller_flow_definition_idstring Optional -
caller_flow_instance_idstring Optional -
caller_flow_slugstring Optional -
caller_node_idstring Optional -
correlation_idstring 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": "workflow.trigger",
"name": "Workflow Chain Receiver",
"category": "triggers",
"version": "1.0.0",
"description": "Receives execution requests from another workflow's Chain node.\n\n This trigger acts as the entry point for a workflow that is invoked by another workflow via the `workflow.chain` node. It enables peer-to-peer workflow chaining without creating a parent-child hierarchy.\n\n **Features:**\n - **Caller Filtering:** Optionally restrict which workflows can chain into this one.\n - **Payload Passthrough:** The calling workflow's payload is available as `$json` in downstream nodes.\n - **Traceability:** Chain context (caller instance, node, correlation ID) is preserved for audit.\n\n **Use Cases:**\n - Modular workflow composition (e.g., shared validation workflow invoked by multiple callers).\n - Event-driven chaining where Workflow A completes a phase and delegates to Workflow B.\n - Reusable sub-processes that remain independently testable and deployable.",
"capabilities": [
"workflow",
"chain",
"composition",
"trigger"
],
"config_schema": {
"type": "object",
"properties": {
"accepted_caller_ids": {
"type": "array",
"items": {
"type": "string"
},
"title": "Accepted Callers",
"description": "Select which workflows are allowed to invoke this one. Leave empty to accept calls from any workflow.",
"default": [],
"x-ui-widget": "flow-definition-multi-picker"
},
"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": null,
"output_contract_schema": {
"type": "object",
"description": "The payload sent by the calling workflow.",
"properties": {
"data": {
"type": "object",
"description": "The chain input data."
},
"chain_context": {
"type": "object",
"description": "Traceability metadata from the caller.",
"properties": {
"caller_flow_definition_id": {
"type": "string"
},
"caller_flow_instance_id": {
"type": "string"
},
"caller_flow_slug": {
"type": "string"
},
"caller_node_id": {
"type": "string"
},
"correlation_id": {
"type": "string"
}
}
}
}
},
"ports": [
{
"port_id": "out",
"label": "Received",
"is_default": true,
"description": "Chain payload received and validated."
},
{
"port_id": "error",
"label": "Error",
"description": "Caller not authorized or validation failed."
}
],
"execution_mode": "sync",
"tags": [
"workflow",
"chain",
"trigger",
"composition"
],
"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",
"properties": {
"accepted_caller_ids": {
"type": "array",
"items": {
"type": "string"
},
"title": "Accepted Callers",
"description": "Select which workflows are allowed to invoke this one. Leave empty to accept calls from any workflow.",
"default": [],
"x-ui-widget": "flow-definition-multi-picker"
},
"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",
"description": "The payload sent by the calling workflow.",
"properties": {
"data": {
"type": "object",
"description": "The chain input data."
},
"chain_context": {
"type": "object",
"description": "Traceability metadata from the caller.",
"properties": {
"caller_flow_definition_id": {
"type": "string"
},
"caller_flow_instance_id": {
"type": "string"
},
"caller_flow_slug": {
"type": "string"
},
"caller_node_id": {
"type": "string"
},
"correlation_id": {
"type": "string"
}
}
}
}
}[
{
"port_id": "out",
"label": "Received",
"is_default": true,
"description": "Chain payload received and validated."
},
{
"port_id": "error",
"label": "Error",
"description": "Caller not authorized or validation failed."
}
]Execution
- Execution
sync- Stateful
- No
- Retries (
retryOnFail) - No
- Capabilities
workflowchaincompositiontrigger- Tags
workflowchaintriggercomposition
Notes and limits
- The caller's data keys are spread at the root, so read them downstream as
$json.<field>; adata.chain_contextkey would be replaced by the realchain_context. chain_context.root_flow_instance_result_idstays the same through every hop of a chain, so any sub-workflow can report the id of the top-level run.- With sample data the engine skips the node and passes the sample input on
outunchanged (without spreadingdata).
Reviewed against the orchestrator code · 31e874b · 2026-11-26