TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

The "Find Workspace Member Duplicates" operation in the Workspace Members resource is designed to identify duplicate workspace members based on provided data. This node is useful when you want to clean up or verify your workspace member list by detecting entries that may represent the same individual or user. For example, if you have multiple records with similar names or user IDs, this operation helps find those duplicates to maintain data integrity.

Typical use cases include:

  • Synchronizing workspace member lists from different sources and ensuring no duplicates exist.
  • Validating new member data before adding it to a workspace.
  • Auditing existing workspace members for potential duplicate entries.

Properties

Name Meaning
Depth Determines how much related nested information to include in the response:
- 0: Only primary workspace member information.
- 1: Primary object plus directly related objects (no further nesting).
- 2: Primary object, its related objects, and their related objects.
Data JSON array of workspace member objects to check for duplicates. Each object can include fields like timeFormat, dateFormat, userId, and a nested name object with firstName and lastName.
Ids JSON array of workspace member IDs to check for duplicates. Can be used alternatively or alongside the Data property to specify which members to analyze.

Output

The output will contain JSON data representing the found duplicate workspace members according to the input criteria. The structure includes the workspace member details and any related nested objects depending on the selected depth level.

If binary data were involved, it would typically represent files or attachments related to workspace members, but this operation focuses on JSON data only.

Dependencies

  • Requires an API key credential for authenticating 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 setup.

Troubleshooting

  • Invalid JSON in Data or Ids: If the JSON provided in the Data or Ids properties is malformed, the node will fail to parse it. Ensure valid JSON formatting.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key or token is correctly set up in n8n credentials.
  • Empty or Incorrect Input: Providing empty arrays or invalid user IDs may result in no duplicates found or errors. Double-check input values.
  • Depth Parameter Misuse: Setting an unsupported depth value outside 0, 1, or 2 might cause unexpected results or errors.

Links and References

Discussion