mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
Merge branch 'patch-3' of https://github.com/TephlonDude/n8n-docs into TephlonDude-patch-3
This commit is contained in:
commit
715d640dab
@ -8,16 +8,18 @@ description: Learn how to use the Merge node in n8n
|
||||
The Merge node is useful to merge data of multiple streams, once data of both streams is available.
|
||||
|
||||
## Node Reference
|
||||
### Mode
|
||||
You can specify how data of branches should be merged. The following are the options.
|
||||
- ***Append:*** Combines data of both inputs. The output will contain items of input 1 and input 2.
|
||||
- ***Keep Key Matches:*** Keeps data of input 1 if it finds a match with data of input 2.
|
||||
- ***Merge By Index:*** Merges data of both the inputs. The output will contain the data of input 1 merged with the data of input 2. The merge occurs based on the index of the items. For example, the first item of input 1 will be merged with the first item of input 2.
|
||||
- ***Merge By Key:*** Merges data of both the inputs. The output will contain the data of input 1 merged with the data of input 2. The merge occurs depending on a defined key.
|
||||
- ***Multiples:*** Merges each value of one input with each value of the other input. The output will contain (m*n) items where (m) and (n) are lengths of the inputs.
|
||||
- ***Pass-through:*** Passes through the data of one input. The output will contain items of the defined input.
|
||||
- ***Remove Key Matches:*** Keeps the data of input 1 if it does not find a match with the data of input 2.
|
||||
- ***Wait:*** Waits till the data of both the inputs is available. It will then output a single empty item.
|
||||
|
||||
- **Mode:** You can specify how data of branches should be merged. The following are the options.
|
||||
- ***Append:*** Combines data of both inputs. The output will contain items of input 1 and input 2.
|
||||
- ***Keep Key Matches:*** Keeps data of input 1 if it finds a match with data of input 2.
|
||||
- ***Merge By Index:*** Merges data of both the inputs. The output will contain the data of input 1 merged with the data of input 2. The merge occurs based on the index of the items. For example, the first item of input 1 will be merged with the first item of input 2.
|
||||
- ***Merge By Key:*** Merges data of both the inputs. The output will contain the data of input 1 merged with the data of input 2. The merge occurs depending on a defined key.
|
||||
- ***Multiples:*** Merges each value of one input with each value of the other input. The output will contain (m*n) items where (m) and (n) are lengths of the inputs.
|
||||
- ***Pass-through:*** Passes through the data of one input. The output will contain items of the defined input.
|
||||
- ***Remove Key Matches:*** Keeps the data of input 1 if it does not find a match with the data of input 2.
|
||||
- ***Wait:*** Waits till the data of both the inputs is available. It will then output a single empty item.
|
||||
### Additional Fields
|
||||
- ***Property Input 1:*** The name of the property which decides which items of input 1 to merge. This field is displayed when 'Keep Key Matches', 'Merge By Key', or 'Remove Key Matches' is selected in the ***Mode*** dropdown list.
|
||||
- ***Property Input 2:*** The name of the property which decides which items of input 2 to merge. This field is displayed when 'Keep Key Matches', 'Merge By Key', or 'Remove Key Matches' is selected in the ***Mode*** dropdown list.
|
||||
- ***Join:*** Use this to specify how many items the output should contain if inputs contain different amount of items. This field is displayed when 'Merge By Index' is selected in the ***Mode*** dropdown list. You can select from the following options.
|
||||
@ -32,8 +34,6 @@ The Merge node is useful to merge data of multiple streams, once data of both st
|
||||
- ***Input 1***
|
||||
- ***Input 2***
|
||||
|
||||
|
||||
|
||||
## Example Usage
|
||||
|
||||
This workflow allows you to merge greetings for the users based on their associated language using the Merge node. You can also find the [workflow](https://n8n.io/workflows/655) on n8n.io. This example usage workflow uses the following nodes.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user