Merge Node
The Merge node converges multiple incoming branches into one output. It waits until all connected parent nodes have completed, then combines their outputs using the configured mode.
Type: MERGE
Category: Flow ControlInputs
Merge supports multiple input handles. When you connect additional nodes to Merge, the editor auto-fills connected source names and adds handles for the new inputs.
Sources are matched by the upstream node name stored in the workflow context. If you rename an upstream node, update the source label if it is not auto-filled.
Modes
| Mode | Behavior |
|---|---|
| Append | Flattens all inputs into one array |
| Merge by Key | Combines array/object rows using a shared key field |
| Keep First | Returns the first non-empty input |
| Keep Last | Returns the last non-empty input |
| Combine | Merges objects; later sources overwrite earlier keys |
| Custom Expression | Runs a JSONata expression against the merge inputs |
Append
Append is useful when multiple branches produce lists.
[
{ "id": 1, "name": "Ada" },
{ "id": 2, "name": "Grace" }
]If an input is not an array, Merge treats it as a single item.
Merge by Key
Merge by Key combines records that share the configured key field.
{
"mode": "mergeByKey",
"keyField": "id"
}The key field can use dot notation, such as user.id.
Combine
Combine is useful for merging object-shaped outputs.
{
"defaults": true,
"status": "approved"
}If a source is not an object, it is preserved under an inputN key.
Custom Expressions
Custom mode uses JSONata. Merge exposes these values:
| Name | Description |
|---|---|
input1, input2, ... | Each source in order |
inputs | Array of all source values |
sources | Object keyed by source label |
Example:
$append(input1, input2)Output
The merged value is stored in the workflow context under the Merge node name:
{
"Merge": [
{ "id": 1 },
{ "id": 2 }
]
}