Steps
All Fields removes nothing when one field differs
With Compare set to All Fields, three items with two exact copies gave two items, and key order did not matter. But copies that differed in a single field, such as a timestamp, an id or a
row_numberfrom Google Sheets, were all kept, with a green run. Use Compare Selected Fields with the field that makes an item unique, or All Fields Except: excludingtsturned two such items into one in our run.The compare is exact: case and spaces count
Ann@x.com,ann@x.com(trailing space) andann@x.comwere all kept. Normalize the field first, for example in an Edit Fields node with{{ $json.email.toLowerCase().trim() }}(we did not run this fix). With Selected Fields the node keeps the FIRST item of each group with all its other fields, so the Ann item survived, not the later Annie. Remove Other Fields drops every field except the compared ones. Twonullvalues counted as copies, and["a","b"]and["b","a"]did not."field is missing from some input items"
One item without
emailfailed the whole node with'email' field is missing from some input items, so no item came out. A field name in the wrong case,Emailforemail, gave the same error. Check the name in the input panel, and give every item the field first (an Edit Fields node with an empty default, fix not run).email, nameas a comma list compared both fields, and a dot path likeuser.emailworked.Type the field name, not an expression
Fields To Compare set to
{{ $json.email }}failed with'ann@x.com' field is missing from some input items: the expression gave the value, and the node looked for a field called ann@x.com. Writeemailas plain text. The same trap exists in the Sort node and Rename Keys. An empty Fields To Compare failed withNo fields specified. Please add a field to compare on."isn't always the same type": 1 and "1"
An
idthat was the number 1 in one item and the string"1"in another failed with'id' isn't always the same typeand the detailin item [0] it's a number and in item [1] it's a string. This happens when items come from two sources, for example a webhook and a spreadsheet. Convert the field to one type before the node, for example{{ String($json.id) }}in Edit Fields (fix not run).One item holding an array is not deduplicated
The node works on items. One item whose field held a list of copies came out unchanged. Split the list into items with Split Out first (fix not run), see n8n Split Out and Aggregate.
Previous Executions does not remove copies inside the same run
The operation Remove Items Processed in Previous Executions remembers values across runs, including manual and CLI runs. Run 1 with ids 1 and 2, then run 2 with ids 2 and 3, kept 3 and sent 2 to the second output, Discarded. But run 1 with ids 1, 1 and 2 kept all three: copies inside one run are not compared with each other. The fix we ran: put a Remove Items Repeated Within Current Input node before it (3 items became 2). When every item is discarded, the Kept output is empty and the next node does not run, which looks like a broken schedule. To set this mode up from scratch, see stop posting the same item twice.
Value to Dedupe On must be an expression with a scalar
Typing
idas plain text gave every item the same value, the word id: run 1 kept everything, and from run 2 on EVERYTHING was discarded, with green runs. An expression to a field that does not exist,{{ $json.ID }}forid, gave an empty value with the same result and no error. An object,{{ $json.user }}, was stored as[object Object], so new users were discarded as already seen. Use a single value, such as{{ $json.id }}or{{ $json.user.id }}(the last one not run).Higher value and later date modes
Value Is Higher than Any Previous Value kept only values above the highest one seen: after a max of 5, run 2 discarded 4 and kept 6. It also reordered the output (input 5, 3 came out 3, 5). Text numbers were compared as numbers (
"10"after"9"was kept), butA-1failed withThe value 'A-1' is not a number. Please provide a number.The date mode worked with ISO dates and failed on24/10/2026withThe value '24/10/2026' is not a valid date. Please provide a valid date.Convert dates first, see n8n Date & Time node not working."exceeds the maximum history size" is a hard limit
History Size is not a rolling window. With History Size 2, run 1 with 3 items failed with
The number of items to be processed exceeds the maximum history size. Please increase the history size or reduce the number of items to be processed.Run 1 with 2 items worked, then run 2 failed with any items, because the stored values count too (we read this check in the node's source). So with the default of 10000, a workflow that has stored about 10000 values starts failing. Above half the limit the node showsSome duplicates may be not be removed since you're approaching the maximum history size. Raise History Size, or clear the history.Clearing the history: same node, or scope Workflow
A separate node with the operation Clear Deduplication History and scope Node did NOT clear another node's history: the item was still discarded. Clearing with scope Workflow did not clear a history stored with scope Node either. What worked: switch the SAME node to Clear Deduplication History, run it once, and switch it back; or set both nodes to scope Workflow, then a separate Clear node works. Renaming the node kept its history (it is stored by node id), and a copied, new node started with an empty history.
What we ran
On 24 October 2026 we ran 63 executions of the Remove Duplicates node v2 (and one of v1.1) on self-hosted n8n 2.43.7 with n8n execute, reading the results from the n8n database. Fixes marked "not run" are suggestions we did not test.
| What we ran | Result |
|---|---|
| All Fields, 3 items with 2 exact copies | 2 items kept |
| All Fields, same keys in another order | Treated as copies |
| All Fields, copies that differ in a timestamp or id | Nothing removed, green |
All Fields Except ts | 2 items -> 1 |
Selected Fields email, Ann@x.com, ann@x.com , ann@x.com | All 3 kept: exact compare |
| Selected Fields, copies with other names | First item kept (Ann, not Annie) |
| Selected Fields + Remove Other Fields | Only the compared fields left |
One item without email | Error 'email' field is missing from some input items |
Field name Email for key email | Same error |
id 1 and "1" | Error 'id' isn't always the same type |
Fields To Compare email, name | Works on both fields |
Dot path user.email | Works |
Fields To Compare {{ $json.email }} | Error 'ann@x.com' field is missing from some input items |
| Fields To Compare empty | Error No fields specified. Please add a field to compare on |
| One item holding an array of copies | Nothing removed |
Two items with null | Treated as copies |
["a","b"] vs ["b","a"] | Different |
| Node v1.1, exact copies | Same as v2 |
| Previous Executions, run 1 ids 1,2 then run 2 ids 2,3 | Kept 3, discarded 2 (second output) |
| Previous Executions, run 1 ids 1,1,2 | All 3 kept |
| Same, Remove Items Repeated Within Current Input first | 3 -> 2 |
Value to Dedupe On typed as text id | Run 2 onward: everything discarded, green |
Value to Dedupe On {{ $json.ID }} (field is id) | Every later item discarded, green |
Value to Dedupe On an object {{ $json.user }} | Read as [object Object], new items discarded |
| Value Is Higher than Any Previous Value, run 1 max 5, run 2 4 and 6 | 4 discarded, 6 kept |
| Same, input 5, 3 | Output reordered 3, 5 |
Same, "9" then "10" | Compared as numbers, 10 kept |
Same, value A-1 | Error: A-1 is not a number |
| Value Is a Date Later than Any Previous Date, ISO dates | Works |
Same, 24/10/2026 | Error: not a valid date |
| History Size 2, 3 items in run 1 | Error: exceeds the maximum history size |
| History Size 2, 2 items then any items in run 2 | Same error |
| Everything discarded | Kept output empty, next node not run |
| Separate Clear Deduplication History node, scope Node | Other node's history not cleared |
| Clear with scope Workflow, history in scope Node | Not cleared |
| Same node switched to Clear, run once, switched back | Cleared |
| Both nodes on scope Workflow, separate Clear node | Cleared |
| Node renamed | History kept |
| New node (copy) | History empty |
Checklist
- Rolling your own dedupe with
$getWorkflowStaticData()instead? Manual runs never save it and failed runs discard it: n8n static data not saving. - Compare on the field that makes an item unique, not All Fields.
- Lowercase and trim text before comparing.
- Every item has the field, with one type.
- Fields To Compare is a name, Value to Dedupe On is an expression.
- Previous Executions: remove in-run copies first.
- Watch History Size, and clear with the same node or scope Workflow.
What we did not test
The editor UI, n8n Cloud, queue mode with several workers, Postgres instead of SQLite, and very large histories.
Start from a working agent
FAQ
Why does n8n Remove Duplicates not remove anything?
With Compare All Fields, items that differ in any field (a timestamp, an id, row_number) are not copies. Compare Selected Fields instead. Case and spaces also count: Ann@x.com and ann@x.com were kept.
What does "field is missing from some input items" mean in n8n?
At least one item has no field with that exact name, or the name is in the wrong case, or you put an expression with the value instead of the field name. The whole node fails.
Why does Remove Items Processed in Previous Executions keep duplicates?
It only compares with earlier runs, not inside the current run. In our run ids 1, 1, 2 were all kept. Add a Remove Items Repeated Within Current Input node before it.
Why does n8n Remove Duplicates discard every item?
Value to Dedupe On is the same for every item: plain text like id, an expression to a missing field, or an object read as [object Object]. Use an expression to one value such as {{ $json.id }}.
How do I fix "exceeds the maximum history size" in n8n?
History Size is a hard cap on stored plus incoming values. Raise it, or clear the history by switching the same node to Clear Deduplication History and running it once.
How do I clear the n8n deduplication history?
Switch the same node to Clear Deduplication History and run it once, or use scope Workflow on both nodes. A separate Clear node with scope Node did not clear another node's history in our run.
Related guides
- n8n Switch node not working: missing items, wrong output and type errors, 30 runs
- n8n Filter node not working: items removed, type errors and empty checks, 32 runs
- n8n Edit Fields (Set) node not working: dropped fields, type errors and invalid JSON, 29 runs
- n8n Compare Datasets not working: everything in A only, no matches and fixes, 40 runs
- n8n: stop posting the same item twice (Remove Duplicates across executions)
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes