TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find View Field Duplicates, is designed to identify duplicate view fields within a system that supports nested related objects. It allows users to specify the depth of related objects to include in the search and provides detailed criteria for finding duplicates based on field metadata and aggregate operations.

Common scenarios where this node would be beneficial include:

  • Data cleansing workflows where duplicate view fields need to be identified and resolved.
  • Reporting or analytics setups requiring validation of unique view fields across nested data structures.
  • Automation processes that maintain data integrity by detecting redundant or overlapping view fields.

For example, a user might want to find all duplicate view fields up to two levels deep in related objects, specifying certain aggregate operations like average (AVG) to refine the search criteria.

Properties

Name Meaning
Depth Determines how many levels of nested related objects to include in the response:
- 0: Only the primary object's information.
- 1: Primary object plus directly related objects.
- 2: Primary object, its related objects, and their related objects.
Data JSON array specifying criteria for finding duplicates. Each item includes:
- fieldMetadataId: Identifier of the field metadata.
- aggregateOperation: The aggregate function to apply (e.g., AVG).
Ids JSON array of IDs to target specific view fields for duplicate detection. Can include null values if no specific IDs are provided.

Output

The node outputs JSON data containing the results of the duplicate search. This typically includes details about the found duplicate view fields according to the specified depth and criteria. The exact structure depends on the API response but generally will list duplicates with their associated metadata and relationships.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential to authenticate requests to the Twenty API service.
  • The node uses the Twenty API base URL configured via credentials.
  • The operation sends HTTP requests with JSON bodies and query parameters as per the input properties.

Troubleshooting

  • Invalid JSON in Data or Ids: Since data and ids inputs expect JSON strings parsed into arrays, malformed JSON will cause errors. Ensure valid JSON formatting.
  • Incorrect Depth Value: Using a depth value outside the allowed range (0, 1, 2) may result in unexpected responses or errors.
  • Authentication Errors: Missing or invalid API credentials will prevent successful API calls.
  • Empty or Null IDs: Providing null or empty arrays in ids might lead to no results or errors depending on API behavior.

To resolve these issues:

  • Validate JSON inputs before running the node.
  • Confirm the depth parameter is set correctly.
  • Verify API credentials are properly configured and active.
  • Provide meaningful IDs when necessary.

Links and References

Discussion