Merge
flow.merge Logic v0.1.0 Combine the items of multiple inputs — append, combine by matching fields / position / all combinations, or choose one branch.
Ports
| Direction | Port | Label |
|---|---|---|
| Input | input1 | Input 1 |
| Input | input2 | Input 2 |
| Output | output | Output |
Input handles follow `numberInputs` (Input 1 … Input N, 2–10). Combine-by-matching-fields always uses exactly two inputs.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Modemode | select | "append" | Append all inputs, combine matching items together, or output one chosen branch unchanged. appendcombinechooseBranch |
Combine bycombineBy | select | "combineByFields" | How items from the inputs are paired up before merging. combineByFieldscombineByPositioncombineAll Shown when mode === "combine" |
Number of inputsnumberInputs | int | 2 | How many inputs to merge (2–10). Combine by matching fields always uses exactly 2. Shown when !isCombineFields(c) |
Fields to matchfieldsToMatch | json | [{"field1":"id","field2":"id"}] | List of { field1, field2 } — the field on Input 1 and the field on Input 2 that must be equal for two items to match. Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields" |
Output typejoinMode | select | "keepMatches" | Which items to output: only matches, only non-matches, everything, or all of one input enriched with the other. keepMatcheskeepNonMatcheskeepEverythingenrichInput1enrichInput2 Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields" |
Output data fromoutputDataFrom | select | "both" | For matched items, output the merged pair or only one input's data. bothinput1input2 Shown when isCombineFields(c) && (joinMode ?? "keepMatches") === "keepMatches" |
Multiple matchesmultipleMatches | select | "all" | Output every matching pair, or only the first match per item. allfirst Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields" |
Fuzzy comparefuzzyCompare | boolean | false | Loosely compare values, so e.g. the number 3 and the string "3" are treated as equal. Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields" |
Disable dot notationdisableDotNotation | boolean | false | Treat field names literally instead of interpreting dots as nested paths. Shown when mode === "combine" && (combineBy ?? "combineByFields") === "combineByFields" |
Include unpaired itemsincludeUnpaired | boolean | false | When the inputs differ in length, also output the left-over (unpaired) items. Shown when mode === "combine" && combineBy === "combineByPosition" |
Clash handlingclashHandling | select | "preferInput2" | When merged items share a field name, choose which value wins — or keep both by suffixing the input number. preferInput1preferInput2addSuffix Shown when mode === "combine" |
OutputchooseBranchOutput | select | "input1" | Which input's data to output unchanged, or a single empty item. input1input2empty Shown when mode === "chooseBranch" |
Examples
Join two branches by position
An earlier revision of the Telegram Echo demo forked the trigger into a timestamp branch and
joined the results back — combineByPosition pairs item n of Input 1 with item n of Input 2:
{
"id": "join",
"type": "flow.merge",
"config": {
"mode": "combine",
"combineBy": "combineByPosition",
"numberInputs": 2,
"includeUnpaired": true,
"clashHandling": "preferInput2"
}
}
Join two datasets by key
{
"mode": "combine",
"combineBy": "combineByFields",
"fieldsToMatch": [{ "field1": "id", "field2": "orderId" }],
"joinMode": "keepMatches",
"outputDataFrom": "both"
}
joinMode gives you the SQL-ish family: keep matches (inner), keep non-matches, keep everything
(enrich), with outputDataFrom choosing both sides or one.
Tips
- Input order is deterministic. The engine orders by target port —
input1is Input 1, always — so “which branch wins on a field clash” (clashHandling) is a real, stable choice. appendmode simply concatenates all inputs’ items;chooseBranchpasses one input through untouched (or a single empty item) — useful as an explicit synchronization point.- Merge emits a list. If exactly one item comes out and the next node wants the bare item,
follow with Limit and its
unwrapSingleoption. fuzzyComparetreats3and"3"as equal when matching fields.
This page is generated from the node registry by gen-node-docs.mjs on every
site build — ports, properties, defaults and visibility rules cannot drift from the code.
The examples above are hand-authored and merged in.