TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node integrates with the Twenty API to create multiple attachments in bulk. It is designed to send a batch of attachment objects to the API, which then processes and stores them accordingly. This operation is useful when you need to upload or register many attachments at once, such as importing files or metadata related to projects, posts, or other entities managed by the Twenty platform.

Practical examples include:

  • Bulk uploading images or documents associated with user profiles or articles.
  • Creating multiple resource attachments in one API call to optimize performance and reduce the number of requests.
  • Automating the import of external data sets that include attachments.

Properties

Name Meaning
Depth Determines how much nested related object information is included in the response:
- 0: Only the primary attachment objects.
- 1: Primary objects plus their directly related objects.
- 2: Includes related objects of those related objects as well.
Body JSON array representing the attachments to create. Each item should be an attachment object, for example { "name": "Attachment name" }. This property accepts raw JSON input describing the attachments to be created.

Output

The node outputs JSON data representing the created attachments. The structure includes the details of each attachment as returned by the API, potentially including nested related objects depending on the selected depth level. The output does not explicitly mention binary data handling, so it is assumed to be purely JSON metadata about the attachments.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • The base URL for the API is configured via credentials.
  • The node uses standard HTTP headers for JSON content negotiation (Accept and Content-Type set to application/json).

Troubleshooting

  • Invalid JSON in Body: If the JSON provided in the Body property is malformed, the node will fail. Ensure the JSON syntax is correct before execution.
  • Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key or token is correctly configured in the node credentials.
  • API Limits or Quotas: Sending very large batches might hit API rate limits or payload size restrictions. Consider splitting large batches into smaller chunks.
  • Depth Parameter Misuse: Setting an unsupported depth value may result in unexpected responses or errors. Use only 0, 1, or 2 as specified.

Links and References

Discussion