// guides · n8n error index

n8n Remove Duplicates not working: missing field, history size, 63 runs

Fix the n8n Remove Duplicates node: All Fields that removes nothing, "field is missing from some input items", "isn't always the same type", Previous Executions that keeps copies or discards everything, "exceeds the maximum history size", and history that will not clear. 63 real runs on n8n 2.43.7.

Updated 2026-10-24 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. 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_number from 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: excluding ts turned two such items into one in our run.

  2. The compare is exact: case and spaces count

    Ann@x.com, ann@x.com (trailing space) and ann@x.com were 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. Two null values counted as copies, and ["a","b"] and ["b","a"] did not.

  3. "field is missing from some input items"

    One item without email failed the whole node with 'email' field is missing from some input items, so no item came out. A field name in the wrong case, Email for email, 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, name as a comma list compared both fields, and a dot path like user.email worked.

  4. 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. Write email as plain text. The same trap exists in the Sort node and Rename Keys. An empty Fields To Compare failed with No fields specified. Please add a field to compare on.

  5. "isn't always the same type": 1 and "1"

    An id that was the number 1 in one item and the string "1" in another failed with 'id' isn't always the same type and the detail in 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).

  6. 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.

  7. 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.

  8. Value to Dedupe On must be an expression with a scalar

    Typing id as 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 }} for id, 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).

  9. 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), but A-1 failed with The value 'A-1' is not a number. Please provide a number. The date mode worked with ISO dates and failed on 24/10/2026 with The value '24/10/2026' is not a valid date. Please provide a valid date. Convert dates first, see n8n Date & Time node not working.

  10. "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 shows Some duplicates may be not be removed since you're approaching the maximum history size. Raise History Size, or clear the history.

  11. 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 ranResult
All Fields, 3 items with 2 exact copies2 items kept
All Fields, same keys in another orderTreated as copies
All Fields, copies that differ in a timestamp or idNothing removed, green
All Fields Except ts2 items -> 1
Selected Fields email, Ann@x.com, ann@x.com , ann@x.comAll 3 kept: exact compare
Selected Fields, copies with other namesFirst item kept (Ann, not Annie)
Selected Fields + Remove Other FieldsOnly the compared fields left
One item without emailError 'email' field is missing from some input items
Field name Email for key emailSame error
id 1 and "1"Error 'id' isn't always the same type
Fields To Compare email, nameWorks on both fields
Dot path user.emailWorks
Fields To Compare {{ $json.email }}Error 'ann@x.com' field is missing from some input items
Fields To Compare emptyError No fields specified. Please add a field to compare on
One item holding an array of copiesNothing removed
Two items with nullTreated as copies
["a","b"] vs ["b","a"]Different
Node v1.1, exact copiesSame as v2
Previous Executions, run 1 ids 1,2 then run 2 ids 2,3Kept 3, discarded 2 (second output)
Previous Executions, run 1 ids 1,1,2All 3 kept
Same, Remove Items Repeated Within Current Input first3 -> 2
Value to Dedupe On typed as text idRun 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 64 discarded, 6 kept
Same, input 5, 3Output reordered 3, 5
Same, "9" then "10"Compared as numbers, 10 kept
Same, value A-1Error: A-1 is not a number
Value Is a Date Later than Any Previous Date, ISO datesWorks
Same, 24/10/2026Error: not a valid date
History Size 2, 3 items in run 1Error: exceeds the maximum history size
History Size 2, 2 items then any items in run 2Same error
Everything discardedKept output empty, next node not run
Separate Clear Deduplication History node, scope NodeOther node's history not cleared
Clear with scope Workflow, history in scope NodeNot cleared
Same node switched to Clear, run once, switched backCleared
Both nodes on scope Workflow, separate Clear nodeCleared
Node renamedHistory kept
New node (copy)History empty

Checklist

What we did not test

The editor UI, n8n Cloud, queue mode with several workers, Postgres instead of SQLite, and very large histories.

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

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.