Merge
core.merge · version 3.2 · Flow
Join the items arriving on several inputs into one list.
Ports
| Port | Kind | Label | Required | Max connections |
|---|---|---|---|---|
| input 0 | main | Input 1 | ||
| input 1 | main | Input 2 | ||
| output 0 | main |
The number of ports depends on the parameters; the table shows the default set.
Credentials
This node uses no credentials.
Parameters
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
mode | options | "append" | One of append, combine, combineBySql, chooseBranch. | ||
numberInputs | number | 2 | Number of inputs. | ||
combineBy | options | "combineByFields" | mode = combine | Combine by. One of combineByFields, combineByPosition, combineAll. | |
fieldsToMatchString | string | advanced = false; combineBy = combineByFields | Fields to match. Comma-separated field names present in both inputs. | ||
advanced | boolean | false | combineBy = combineByFields | Fields have different names. | |
mergeByFields | fixed_collection | advanced = true; combineBy = combineByFields | Field pairs. | ||
mergeByFields.values | fixed_collection | Pair. | |||
mergeByFields.values.field1 | string | Input 1 field. | |||
mergeByFields.values.field2 | string | Input 2 field. | |||
joinMode | options | "keepMatches" | combineBy = combineByFields | Output. One of keepMatches, keepNonMatches, keepEverything, enrichInput1, enrichInput2. | |
outputDataFrom | options | "both" | joinMode = keepMatches, keepNonMatches | Take data from. One of both, input1, input2. | |
output | options | "specifiedInput" | mode = chooseBranch | One of specifiedInput, empty. | |
useDataOfInput | number | 1 | mode = chooseBranch; output = specifiedInput | Input to pass through. | |
options | collection | ||||
options.clashHandling | fixed_collection | When fields clash. | |||
options.clashHandling.values | collection | Rule. | |||
options.clashHandling.values.resolveClash | options | "preferLast" | Keep the value from. One of preferLast, preferInput1, preferInput2, addSuffix. | ||
options.clashHandling.values.mergeMode | options | "deepMerge" | Nested fields. One of deepMerge, shallowMerge. | ||
options.clashHandling.values.overrideEmpty | boolean | false | Keep non-empty values. Do not let an empty value from the preferred input replace a filled one. | ||
options.fuzzyCompare | boolean | false | Fuzzy compare. Treat values as equal when their text forms match (e.g. 3 and “3”). | ||
options.disableDotNotation | boolean | false | Literal field names. Do not treat dots in field names as nested paths. | ||
options.includeUnpaired | boolean | false | Keep unpaired items. | ||
options.multipleMatches | options | "all" | Multiple matches. One of all, first. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.merge | 1 | unverified | |
n8n-nodes-base.merge | 2 | unverified | |
n8n-nodes-base.merge | >=3 <4 | unverified |