TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node allows you to create a single Task Target in the Twenty API. A Task Target typically represents an entity (such as a person, company, or opportunity) associated with a specific task. This operation is useful when you want to link a task to one or more related entities for tracking or workflow purposes.

Common scenarios include:

  • Assigning a task to a particular person or company.
  • Linking a task to an opportunity for sales pipeline management.
  • Creating detailed task relationships to improve project or CRM data organization.

For example, you might use this node to create a task target that associates a follow-up task with a specific sales opportunity and contact person.

Properties

Name Meaning
Depth Determines how much nested related object information to include in the response:
- 0: Only the primary Task Target object.
- 1: Primary object plus directly related objects.
- 2: Includes related objects of related objects.
Opportunity Id The ID of the opportunity to associate with the new Task Target.
Company Id The ID of the company to associate with the new Task Target.
Person Id The ID of the person to associate with the new Task Target.
Task Id The ID of the task to which this target will be linked.

Output

The node outputs JSON data representing the newly created Task Target object. Depending on the Depth property, this output may include nested related objects up to two levels deep. The structure contains identifiers and details of the Task Target and its linked entities (opportunity, company, person, task).

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • The node expects the base URL and authentication token to be configured in the credentials.
  • No additional external dependencies are required beyond the Twenty API access.

Troubleshooting

  • Missing Required IDs: If the taskId or other related entity IDs are missing or invalid, the API call will fail. Ensure all necessary IDs are provided and correctly formatted.
  • Authentication Errors: If the API key or domain credentials are incorrect or expired, authentication will fail. Verify credentials in n8n settings.
  • Invalid Depth Value: Using a depth value outside the allowed range (0, 1, 2) may cause unexpected responses or errors.
  • API Rate Limits: Excessive requests may trigger rate limiting; handle such errors by implementing retries or backoff.

Links and References

Discussion