TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

The node operation Find Webhook Duplicates is designed to identify duplicate webhook entries based on provided data and optional IDs. It allows users to specify the depth of related objects to include in the response, enabling flexible retrieval of nested information about webhooks and their relationships. This operation is useful in scenarios where you want to clean up or audit webhook configurations by detecting duplicates that might cause redundant triggers or conflicts.

Practical examples:

  • A user managing multiple webhook endpoints wants to find if any webhook URLs or configurations are duplicated across their system.
  • During migration or integration, a developer needs to verify that no duplicate webhook entries exist to avoid processing the same event multiple times.

Properties

Name Meaning
Depth Determines how much related object data to include in the response:
- 0: Only primary webhook objects.
- 1: Primary objects plus directly related objects.
- 2: Primary objects, directly related objects, and their related objects.
Data JSON array representing the webhook data to check for duplicates. The structure depends on the webhook schema but typically includes webhook details like URL, events, etc.
Ids JSON array of webhook IDs to consider when finding duplicates. Can be used to limit the search scope or specify particular webhooks to compare.

Output

The output contains a JSON structure with the results of the duplicate search. It includes the primary webhook objects and, depending on the Depth property, nested related objects up to two levels deep. The exact fields depend on the webhook schema but generally will include identifiers, webhook configuration details, and references to related entities.

If binary data were involved (not indicated here), it would represent associated files or payloads, but this operation focuses on JSON data only.

Dependencies

  • Requires an API key credential to authenticate requests to the external Twenty API service.
  • The node uses the Twenty API base URL configured via credentials.
  • No additional environment variables are explicitly required beyond standard API authentication.

Troubleshooting

  • Invalid JSON in Data or Ids properties: Since these inputs expect JSON arrays, malformed JSON will cause errors. Ensure valid JSON syntax is used.
  • Authentication errors: If the API key or domain is misconfigured, the node will fail to connect. Verify credentials are correctly set.
  • Empty or missing data: Providing empty arrays or null values may result in no duplicates found or unexpected responses. Always provide meaningful input data.
  • Depth value out of range: Only 0, 1, or 2 are valid. Using other values may cause the request to fail or ignore the parameter.

Links and References

  • Twenty API Documentation — Official API docs for understanding webhook data structures and operations.
  • n8n Documentation — General guidance on creating and using custom nodes and handling JSON inputs.

Discussion