TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node interacts with the "Note Targets" resource of an API, specifically supporting the operation to create multiple note targets in a single request. It is useful when you need to batch-create several note target entries efficiently rather than creating them one by one. For example, if you have a list of notes or annotations that need to be linked to various targets in your system, this node can send them all at once, saving time and reducing the number of API calls.

Properties

Name Meaning
Depth Determines how much related nested data to include in the response:
- 0: Only the primary note target objects.
- 1: Primary objects plus their directly related objects.
- 2: Primary objects, their related objects, and those related objects' related objects.
Body JSON object representing the note target(s) to create. This should contain the details of the note targets you want to add.

Output

The node outputs JSON data representing the created note targets. The structure of the output depends on the Depth parameter:

  • At depth 0, the output includes only the basic information about each newly created note target.
  • At depth 1 or 2, the output also contains nested related objects as specified by the depth level.

No binary data output is indicated for this node.

Dependencies

  • Requires an API key credential (or similar authentication token) to connect to the Twenty API service.
  • The base URL for the API is configured dynamically from credentials.
  • The node uses standard HTTP headers for JSON content (Accept: application/json, Content-Type: application/json).

Troubleshooting

  • Invalid JSON in Body: If the JSON provided in the "Body" property is malformed, the node will likely throw a parsing error. Ensure the JSON is valid before running.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key or token is correctly set up in the node's credentials.
  • API Limits or Quotas: Creating many note targets at once might hit API rate limits or payload size restrictions. If errors occur, try reducing the batch size.
  • Incorrect Depth Value: Using an unsupported depth value may result in unexpected responses or errors. Use only 0, 1, or 2 as defined.

Links and References

Discussion