1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

array → Remove Duplicates from an Array

AI-generated

Overview

This node removes duplicate entries from an array based on specified fields and case sensitivity options. It is useful in scenarios where you need to clean up data by ensuring that only unique items remain, such as deduplicating user lists, product inventories, or any dataset with potential repeated records.

Practical examples:

  • Removing duplicate email addresses from a mailing list.
  • Ensuring a list of products contains only unique SKUs.
  • Cleaning up imported CSV data to avoid processing the same entry multiple times.

Properties

Name Meaning
Data Array of lines with mixed values. This is the main input array from which duplicates will be removed.
Fields Input Mode Determines how fields for uniqueness comparison are provided. Options: Expression (fields defined via expression), Manual (fields entered manually).
Fields Array of fields to compare for uniqueness. If left empty, all fields of the first array item are used. The input method depends on "Fields Input Mode".
Ignore case sensitivity Sets whether the operation should ignore case when comparing values for uniqueness. If enabled, "A" and "a" would be considered the same.

Output

The output is a JSON array containing only the unique items from the input array, according to the selected fields and case sensitivity settings.
Each output item has the same structure as the input items, minus any duplicates.

Example output:

[
  { "email": "user@example.com", "name": "User One" },
  { "email": "admin@example.com", "name": "Admin" }
]

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • n8n Configuration: No additional environment variables required beyond standard credential setup.

Troubleshooting

  • Common Issues:

    • Invalid API Key: If your credentials are incorrect or missing, the node will fail to connect to the 1001fx API.
    • Malformed Input Data: If the "Data" property is not a valid array, the node may return an error or unexpected results.
    • Empty Fields: If "Fields" is empty and the first array item has no fields, the node cannot determine uniqueness.
  • Error Messages:

    • "error": "Invalid API key" – Check your 1001fxApi credentials in n8n.
    • "error": "Input data is not an array" – Ensure the "Data" property is set to a valid array.
    • "error": "No fields to compare" – Provide at least one field or ensure the first item in the array has fields.

Links and References

Discussion