n8n deduplication: current input versus execution history
Deduplicate by stable ID, distinguish current-input checks from history checks, and keep the text needed by AI.
Separate stable IDs from text · Compare the current input only · History comparison is separate state
At a glance
The goal is to inspect duplicate records before later AI processing so that the same input is not submitted repeatedly. Synthetic records illustrate parameter choices. You need a stable upstream id and workflow editing access. n8n was not run; cross-execution storage and actual cost reductions were not verified.
Input, configuration and output checks
Prepare input
Define identifiers, fields and the intended output before configuration.
Inspect settings
Inspect the documented operation and its relevant options.
Verify and stop
Inspect identifiers and results before downstream processing; stop when the contract is unclear.
Separate stable IDs from text
Prepare three synthetic records with ids a, a and b; their text may differ. Define duplication first: compare id for message identity, or use All Fields when every field must match. Identical text does not automatically mean the same message, and changed text does not automatically mean a new one. The exercise checks the unique id set a, b without specifying which duplicate text wins; verify that choice in your actual version.
Compare the current input only
Select Remove Items Repeated Within Current Input, choose Selected Fields and enter id. All Fields Except can exclude changing fields that are irrelevant to identity. Enabling Remove Other Fields removes fields not used for comparison, so check that it is off when downstream processing still needs the text. Whether parent.child refers to a nested field depends on Disable Dot Notation; distinguish a dotted key from an object path.
History comparison is separate state
Remove Items Processed in Previous Executions compares values seen in earlier runs. Value Is New needs a unique ID; the other modes compare higher values or later dates. Node scope is independent per node, while Workflow scope shares data with other deduplication nodes using that scope. History Size for Value Is New defaults to 10,000 items; this setting does not establish permanent idempotency or concurrent transaction guarantees.
Inspect fields before clearing history
The local fixture checks only the unique id set and does not simulate n8n history storage. In a disposable workflow, inspect the output count, ids and retained text, then repeat the input to observe history mode. Clear Deduplication History manages stored history and does not deduplicate current input. Confirm scope and the effects before using it. Stop downstream model calls when IDs are missing, text is removed or history scope is unclear; clearing history does not resolve those errors.
Article sources
Original editorial content; official descriptions and checking suggestions are distinguished.