n8n Merge Node: Complete Guide to Combining Data in Workflows
The Merge node is one of the most powerful — and most misunderstood — nodes in n8n. It takes data from two separate branches of a workflow and combines them into a single stream of items. Getting comfortable with the Merge node unlocks a whole new class of workflow patterns that would be impossible with linear, single-branch automation.
This guide goes deep on the Merge node: what each mode does, when to use it, how the input ordering works, and real examples of the Merge node solving practical problems in n8n workflows.
Why the Merge Node Exists
In n8n, workflows can split into multiple branches — for example, after an IF node, two different paths execute in parallel based on a condition. Or you might fetch data from two different APIs and want to combine those results before processing them together. The Merge node is what brings those separate paths back together into one.
Without the Merge node, parallel branches in n8n stay separate all the way to the end. There’s no automatic recombination. If you want downstream nodes to work with data from multiple branches simultaneously, you need to explicitly merge them first. This design gives you fine-grained control over exactly how and when data gets combined.
Merge Mode: Append
Append is the simplest mode. It takes all items from Input 1 and all items from Input 2 and concatenates them into a single list — Input 1 items first, then Input 2 items. No matching, no pairing — just one list after the other.
Use Append when you have two independent sets of items that you want processed together by downstream nodes. For example, fetching active users from one API and inactive users from another, then merging them with Append before sending all of them to a reporting node. The total item count in Append mode equals the sum of both inputs.
Merge Mode: Combine — Keep Matches
Combine → Keep Matches works like a SQL INNER JOIN. For each item in Input 1, it finds the matching item(s) in Input 2 based on a field you specify, and outputs a merged item containing fields from both inputs. Only items that have a match in both inputs appear in the output — unmatched items from either side are discarded.
This is useful when you have two datasets that share a common key and you want to enrich one with data from the other, keeping only the records that exist in both. For example, matching order records (Input 1) with customer records (Input 2) on a shared customer ID — the output contains order details combined with customer details, and any orders without a matching customer are dropped.
Merge Mode: Combine — Keep Everything
Combine → Keep Everything is a FULL OUTER JOIN. It outputs all items from both inputs, matching them where possible and leaving unmatched fields empty (null) where no match exists. Every item from both inputs appears in the output regardless of whether a match was found.
This is the right choice when you can’t afford to lose records from either side. For example, comparing two product catalogs from different systems — you want to see all products from both, with matched fields filled in where the product exists in both systems, and nulls where it only exists in one. The output item count equals the total number of unique items across both inputs after matching.
Merge Mode: Combine — Keep Input 1 / Keep Input 2
These modes are LEFT JOIN and RIGHT JOIN equivalents. Keep Input 1 outputs all items from Input 1, enriched with matching data from Input 2 where a match exists — items from Input 1 with no match in Input 2 still appear, just without the Input 2 fields. Keep Input 2 does the reverse.
Use these when one dataset is your “source of truth” and you want to optionally enrich it with data from another source, without losing any records from the primary dataset. A common pattern: you have a list of contacts from your CRM (Input 1) and you want to attach their latest activity from an analytics tool (Input 2) — contacts without any recorded activity should still appear in the output.
Merge Mode: Multiplex
Multiplex creates every possible combination of items from Input 1 and Input 2 — a Cartesian product. If Input 1 has 3 items and Input 2 has 4 items, the output has 12 items (3 × 4), each containing fields from one Input 1 item paired with one Input 2 item.
This is less commonly needed but very useful for specific scenarios. For example, if you have a list of email templates (Input 1) and a list of recipient segments (Input 2) and you want to generate every template-segment combination for an A/B testing campaign, Multiplex handles it in a single node instead of nested loops.
How Input Ordering Works
The Merge node always waits for both inputs to have data before executing. In n8n, when a workflow splits into two branches, both branches run in parallel — the Merge node collects results from each branch as they complete, then triggers once both inputs are ready. You don’t need to coordinate timing manually.
The distinction between Input 1 and Input 2 matters in modes where the order is asymmetric (Keep Matches, Keep Input 1, etc.). Input 1 is the connection on the top input socket of the Merge node, and Input 2 is the bottom. If your merge logic depends on which side is the “primary” dataset, make sure your connections reflect this.
Practical Examples
Here are real n8n workflow patterns that rely on the Merge node. In an API enrichment pipeline: fetch records from a primary API (Input 1), fetch supplemental data from a secondary API (Input 2), Merge with Keep Matches on a shared ID to produce enriched records, then write the result to a database. In a multi-source aggregation: pull data from two separate databases (one legacy, one current), Merge with Append to combine all records, then deduplicate and process together.
In a conditional branch recombination: an IF node splits items into two paths (true/false), each path transforms the data differently, then a Merge with Append reunites both streams for a shared downstream step. In a cross-product report generator: fetch product categories (Input 1) and time periods (Input 2), Multiplex to generate every category-period combination, then query metrics for each combination in a subsequent HTTP Request node.
