0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Operator → Remove Duplicates

AI-generated

Overview

The node provides a utility to remove duplicate items from an array. It is part of a broader toolbox of no-code utilities designed to simplify common data manipulation tasks. This specific operation, "Remove Duplicates," takes an input array and returns a new array with all duplicate entries removed.

This node is beneficial in scenarios where you need to clean or preprocess data by ensuring uniqueness, such as filtering user inputs, cleaning lists before further processing, or preparing datasets for analysis.

Example use case:
You have a list of fruits ["apple", "banana", "apple", "cherry"] and want to get a unique list without repeated entries. Using this node, the output would be ["apple", "banana", "cherry"].

Properties

Name Meaning
Array Data The input array containing items from which duplicates should be removed. Example: ["apple", "banana", "apple", "cherry"]

Output

The node outputs a JSON object containing the processed array with duplicates removed. The structure typically includes a field (commonly named json) holding the resulting array of unique items.

If the input was:

["apple", "banana", "apple", "cherry"]

The output's json field would be:

{
  "result": ["apple", "banana", "cherry"]
}

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authentication to the external service at https://prod.0codekit.com.
  • The node sends a POST request to the endpoint /operator/duplicate with the input array in the request body.
  • Proper configuration of the API key credential within n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Input that is not a valid JSON array may result in errors or unexpected behavior.
    • Network connectivity issues can prevent reaching the external API endpoint.
  • Error messages:

    • Authentication errors typically indicate invalid or missing credentials; verify the API key setup.
    • Validation errors may occur if the input array is malformed; ensure the input is a proper JSON array.
    • Timeout or network errors suggest connectivity problems; check your internet connection and firewall settings.

Links and References

Discussion