TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows you to create multiple message threads in bulk. A message thread represents a group of related messages, such as an email conversation or a chat thread. This operation is useful when you need to import or synchronize large sets of threaded conversations into a system that supports message threading.

Common scenarios include:

  • Migrating email or chat data from one platform to another.
  • Bulk creating discussion threads in a forum or messaging app.
  • Importing historical conversation data for analytics or archiving.

For example, you might use this node to upload a JSON array of email threads, each containing multiple related messages, to a communication platform's API.

Properties

Name Meaning
Depth Determines how much nested related object information to include in the response:
- 0: Only the primary message thread object.
- 1: The primary object plus its directly related objects (no further nesting).
- 2: The primary object, its related objects, and their related objects (two levels deep).
Body The JSON representation of the message threads to create. This should be a structured JSON object or array representing groups of related messages (e.g., an email thread or chat thread).

Output

The output json field contains the response from the API after creating the message threads. It includes the created message thread objects with details depending on the specified Depth level. The structure reflects the primary objects and their nested related objects as requested.

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

Dependencies

  • Requires an API key credential to authenticate requests to the Twenty API service.
  • The base URL for the API is configured via credentials.
  • The node uses the Twenty API version 1.0.3 OpenAPI specification for request construction.

Troubleshooting

  • Invalid JSON in Body: If the Body property contains malformed JSON, the node will fail parsing it. Ensure the JSON is valid before inputting.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly set up in the node credentials.
  • Depth Parameter Misuse: Setting an unsupported depth value may result in unexpected responses or errors. Use only 0, 1, or 2 as defined.
  • API Rate Limits: Creating many threads at once might hit API rate limits. Consider batching requests if errors occur.
  • Network Issues: Connectivity problems can cause request failures. Check network access and API endpoint availability.

Links and References

Discussion