Sign In

Deduplicate

Remove duplicate items from an array by comparing specific fields, all fields, or all fields except excluded ones.

The Deduplicate node removes duplicate entries from an array. You can compare items by a specific field, by all fields (exact match), or by all fields except a set you exclude. When duplicates are found, you control whether the first or last occurrence is kept. Use it after merging datasets, importing CSVs, or collecting webhook events where duplicates are expected.

Configuration

Source Array

FieldTypeRequiredDescription
Source Arraytemplate stringYesVariable path to the array to deduplicate, e.g. nodes.merge_1.merged

The source must resolve to an array. If it resolves to a non-array value, the node fails with a NOT_ARRAY error.

Compare Mode

ValueBehavior
By Specific FieldCompare items using a single named property
All Fields (exact match)Compare the full JSON serialization of each item
All Fields Except...Compare all fields except the ones you exclude

Defaults to By Specific Field.

Deduplicate Key

Only shown when Compare Mode is By Specific Field.

FieldTypeRequiredDescription
Deduplicate KeytextNoObject property to check for duplicates (e.g. email, id). Leave empty for primitive value comparison.

Except Fields

Only shown when Compare Mode is All Fields Except....

FieldTypeRequiredDescription
Except FieldstextNoComma-separated field names to exclude from comparison (e.g. id, updatedAt).

Keep

ValueBehavior
Keep first occurrenceRetains the first item encountered and discards later duplicates
Keep last occurrenceRetains the last item encountered and discards earlier duplicates

Defaults to Keep first occurrence.

Output

FieldTypeDescription
uniquearrayThe deduplicated array
duplicateCountnumberNumber of duplicate items that were removed

Example

Two API sources return user lists that may overlap. After merging them, you want to ensure each email address appears only once:

  1. Add a Merge node to combine both API results into a single array.
  2. Add a Deduplicate node after the merge.
  3. Set Source Array to nodes.merge_1.merged.
  4. Set Compare Mode to By Specific Field.
  5. Set Deduplicate Key to email.
  6. Set Keep to Keep first occurrence.

The output at nodes.removeDuplicates_1.unique contains one entry per unique email address, and nodes.removeDuplicates_1.duplicateCount tells you how many duplicates were removed.

See the Logic Nodes overview for a full list of available nodes.

On this page

Deduplicate | Buildorado