TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find View Filter Duplicates, is designed to identify duplicate view filters within a system. It allows users to specify certain criteria and data points to search for duplicates based on the provided filter metadata and IDs. This can be particularly useful in scenarios where managing and cleaning up redundant or overlapping filters is necessary to maintain data integrity and optimize query performance.

Practical examples include:

  • Detecting duplicate saved filters in a dashboard or reporting tool.
  • Cleaning up redundant view filters before sharing or exporting configurations.
  • Automating maintenance tasks that require identifying and handling duplicate filter definitions.

Properties

Name Meaning
Depth Determines how deeply nested related objects are included in the response:
- 0: Only the primary object's information.
- 1: Primary object plus directly related objects (no further nesting).
- 2: Primary object, its related objects, and their related objects.
Data JSON array specifying the filter metadata to use for finding duplicates. Each item typically includes a fieldMetadataId which identifies specific fields involved in the filter criteria.
Ids JSON array of IDs to limit the search scope for duplicates. Can be used to specify particular view filter IDs to check against.

Output

The node outputs JSON data representing the found duplicate view filters according to the specified criteria. The structure will include details about each duplicate filter detected, potentially including nested related objects depending on the Depth property setting.

If binary data output is supported by the underlying API or implementation, it would generally represent attachments or files related to the filters, but this is not indicated in the provided code or properties.

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.
  • The node depends on the @devlikeapro/n8n-openapi-node package and a bundled OpenAPI specification (twenty-v1.0.3-openapi.json) to build its properties and handle requests.

Troubleshooting

  • Invalid JSON in Data or Ids: Since Data and Ids expect JSON input, malformed JSON will cause errors. Ensure valid JSON syntax when entering these fields.
  • Authentication Errors: Missing or incorrect API credentials will prevent successful API calls. Verify that the API key and domain are correctly set in the node credentials.
  • No Duplicates Found: If no duplicates are returned, verify that the Data and Ids inputs correctly reflect existing filters and that the Depth level is appropriate for your needs.
  • Unexpected Response Structure: Adjust the Depth property if related objects are missing or too deeply nested in the response.

Links and References

Discussion