Resources · n8n integration

n8n Compare Datasets nodeConfigure Compare Datasets in n8n.

The n8n Compare Datasets node takes two input streams and sorts every item into four branches. Seven parameters decide which fields make two items a match, what happens when the values differ, and how duplicates are handled. Useful the day two systems stop agreeing.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Compare Datasets node actually do?

The Compare Datasets node compares two inputs for changes. You give it a field that identifies the same record on both sides, and it splits the result across four outputs: In A only Branch for data that exists only in the first input, Same Branch for items that agree, Different Branch for items that match on the key but differ elsewhere, and In B only Branch for data that exists only in the second input.

Comparison runs in two stages. First n8n checks the values of the fields you picked in Fields to Match across both inputs. When those keys line up, it then compares all the other fields inside the two items to decide whether they belong in the Same branch or the Different branch. That second stage is why a field that changes on its own, like a timestamp, can push perfectly healthy records into Different until you tell the node to ignore it.

Three shapes of work cover most of what this node is used for. A reconciliation: yesterday's export on input A, today's on input B, and the Different branch becomes your change log. A one way sync: rows pulled from Google Sheets on one side, records from an API on the other, with In B only feeding the creation step and In A only feeding the archive step. A deduplication pass: two lists of the same people, Multiple Matches set to Include First Match Only so a repeated record is not counted twice.

Pick the right node for the job. Merge combines two streams into one, this node keeps them apart and tells you how they differ. If routes items on a condition you already know, while Compare Datasets works out the condition for you by looking at the other input. Once the four branches exist, Switch is often what sends each one to the right follow up.

The limits are worth knowing before you build. The node needs two inputs, so both sides have to be fetched first, and it runs on the items it receives rather than opening a workflow on its own: a Schedule Trigger or a Webhook goes in front of it. Matching is done on field names you type as text, which means a rename upstream breaks the match silently. And the comparison is structural, not semantic: two spellings of the same city are simply different values. For a deeper look at where n8n fits, the n8n review covers the platform itself.

Parameters

Which parameters shape the comparison?

The Compare Datasets node has 7 parameters. For each one: the node as you configure it in n8n, what the parameter changes, and our field notes.

01

Fields to Match

mergeByFields

What you see in n8n

Notes & use cases

This is where the comparison starts. You name one field per input, and n8n treats items sharing that value as the same record before it looks at anything else. Select Add Fields to Match to compare on several keys at once.

Key parameters

  • Input A Field: the field name taken from input stream A, typed as text, for example id.
  • Input B Field: the matching field on input stream B, which can carry a different name when the two systems disagree on naming.
Use cases
a customer list and a billing export both carry an account reference, so the node pairs the rows on it and reports only the ones that drifted.
02

When There Are Differences

resolve

What you see in n8n

Notes & use cases

Once two items match on the key but disagree on the rest, this selector decides what the Different branch actually contains.

Key parameters

  • Use Input A Version: treats input stream A as the source of truth.
  • Use Input B Version: hands that role to input stream B.
  • Use a Mix of Versions: output uses different inputs for different fields. It opens Prefer, where you pick the main source, and For Everything Except, the field names pulled from the other side, comma separated.
  • Include Both Versions: output contains all data, with a more complex structure.
Use cases
a CRM owns the contact details, the invoicing tool owns the address.
03

Fuzzy Compare

fuzzyCompare

What you see in n8n

Notes & use cases

Turned on, the comparison tolerates small type differences between fields. The number 3 and the string '3' are then treated as the same, where a strict comparison would send the pair straight to the Different branch. Leave it off when a type change is exactly what you are hunting for.

Key parameters

  • Fuzzy Compare: a switch on the main panel, off by default, applied to the whole comparison rather than to one field.
Use cases
a spreadsheet hands over quantities as text while an API returns them as numbers, and the run stops reporting hundreds of fake changes.
04

Fields to Skip Comparing

options.skipFields

What you see in n8n

Notes & use cases

Some fields move on their own and say nothing about the record. This option lists the ones that shouldn't be included when checking whether two items are the same, as text, separated by commas.

Key parameters

  • Fields to Skip Comparing: field names to ignore, for example updated_at, updated_by. In the documented example, two datasets matched on person.language come back as different until person.name is added here, after which n8n returns them as matching.
Use cases
an export stamps every row with a sync date, and skipping that one field empties the Different branch of noise.
05

Fuzzy Compare

options.fuzzyCompare

What you see in n8n

Notes & use cases

The same type tolerance is also reachable from the node Options collection, which you open with Add option. Every option you add shows up as one more field in the panel, and the ones you leave out keep their default value, so adding it here is how you make the setting explicit next to the other comparison tweaks.

Key parameters

  • Fuzzy Compare: whether to tolerate small type differences when comparing fields, the number 3 and the string '3' being treated as the same.
Use cases
a workflow already carrying Multiple Matches and Fields to Skip Comparing in Options keeps its whole comparison policy in one place.
06

Disable Dot Notation

options.disableDotNotation

What you see in n8n

Notes & use cases

By default a field name written parent.child reaches into a nested object. Turn this option on and that stops: the name is read literally instead. Off, which is the default, keeps the nested reference working.

Key parameters

  • Disable Dot Notation: whether to disallow referencing child fields using parent.child in the field name.
Use cases
an API returns a flat field whose name genuinely contains a dot, and turning the option on stops n8n from hunting for a child field that does not exist.
07

Multiple Matches

options.multipleMatches

What you see in n8n

Notes & use cases

Duplicate data is the normal case, not the exception, and this selector says what to do with it. The default is Include All Matches.

Key parameters

  • Include All Matches: output multiple items if there are multiple matches, which on the documented fruit example gives three items in the Same Branch tab.
  • Include First Match Only: only ever output a single item per match. Two items come back instead, the repeated apple counting once.
Use cases
a list where the same person appears twice should trigger one follow up, so Include First Match Only keeps the count honest.
Need help

Need help automating Compare Datasets with n8n?

A person reads every message.

FAQ

Compare Datasets in n8n, answered

01Is the Compare Datasets node included in n8n?
Yes. Compare Datasets is a core node shipped with n8n, so there is nothing to install and no extra cost on top of what you already run. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use licence. A workflow built in one place opens unchanged in the other. The page describes version 2 of the node, the highest version in the catalogue; an older workflow can still show an earlier version with fewer options, and a node never changes version on its own.
02What credentials does the n8n Compare Datasets node need?
None. This node has no credential and no Authentication selector, so there is nothing to set up on any account before you use it. Everything it needs arrives through its two inputs, which means the authentication question belongs to the nodes placed before it: whatever fetches list A and whatever fetches list B. Practically, you drop the node on the canvas, wire two branches into it, type the field names in Fields to Match and run. That also makes it easy to test, since no token can expire halfway through a comparison.
03What are the limits of Compare Datasets in n8n?
It compares, it does not fetch. Both datasets have to be loaded by earlier nodes, and the comparison is structural: values are equal or they are not, unless Fuzzy Compare smooths over a type difference. Matching relies on field names you type as text, so a rename upstream quietly breaks the pairing, and nested names depend on dot notation staying enabled. The node also runs on the items it receives and does not start a workflow, so something has to trigger it. Version 2 is the version documented here; an older workflow may expose fewer options.
04When should you use Compare Datasets instead of Merge?
Use Merge when the goal is one combined stream, and Compare Datasets when the goal is knowing how two streams differ. Merge brings items together; this node keeps them separated across four outputs, In A only Branch, Same Branch, Different Branch and In B only Branch, which is exactly what a reconciliation or a sync needs. If the routing condition is already known, If or Switch is simpler and cheaper to read. And if the second dataset has to come from an API that no dedicated node covers, HTTP Request fetches it first, then Compare Datasets does the rest.
05n8n or Make for comparing two datasets?
It depends on how you want to host and pay. Make is a hosted automation platform with no self-hosting option and billing per operation, so a comparison over a large dataset is priced by the volume it moves. n8n runs on Cloud or on your own machine, which keeps the data on infrastructure you control and changes the cost model. The visual logic differs too: in n8n the four branches of this node are wired on the canvas, and each one gets its own follow up. Both work; the choice is about hosting, data control, cost and how you like to build.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.