TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

The node interacts with the "Message Threads" resource of an external API to find duplicate message threads based on provided criteria. It allows users to specify the depth of related objects to include in the response and submit data or IDs to identify duplicates. This node is useful in scenarios where you want to detect and handle duplicate conversations or threads within a messaging system, helping maintain data integrity and avoid redundant processing.

Practical examples:

  • Identifying duplicate customer support threads to merge or close them.
  • Detecting repeated discussion topics in a forum or chat application.
  • Cleaning up duplicate message threads before analytics or reporting.

Properties

Name Meaning
Depth Determines the level of nested related objects to include in the response:
- 0: Only the primary object's information.
- 1: Primary object plus its directly related objects (no further nesting).
- 2: Primary object, its directly related objects, and their related objects.
Data JSON array representing the data used to find duplicates. The exact structure depends on the API but typically includes message thread details to compare against existing threads.
Ids JSON array of IDs representing specific message threads to check for duplicates. Can be null or contain multiple IDs.

Output

The node outputs JSON data containing the results of the duplicate search. The structure includes the found duplicate message threads along with their related objects depending on the specified depth. The output helps identify which threads are considered duplicates based on the input criteria.

If the API supports binary data (not indicated here), it would typically represent attachments or media related to message threads, but this node focuses on JSON data.

Dependencies

  • Requires an API key credential for authenticating with the external Twenty API service.
  • The base URL and authentication token must be configured in the node credentials.
  • The node uses the @devlikeapro/n8n-openapi-node package and a bundled OpenAPI specification (twenty-v1.0.3-openapi.json) to build request properties dynamically.

Troubleshooting

  • Invalid JSON in Data or Ids: Since these inputs expect JSON arrays, malformed JSON will cause errors. Ensure valid JSON formatting.
  • Authentication Errors: Missing or incorrect API credentials will result in authorization failures. Verify that the API key and domain are correctly set in credentials.
  • Depth Parameter Misuse: Using unsupported depth values may lead to unexpected responses or errors. Use only 0, 1, or 2 as defined.
  • Empty or Null Inputs: Providing empty arrays or null values might return no results or errors depending on the API behavior. Always provide meaningful data or IDs.

Links and References

Discussion