TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node allows you to create a single timeline activity in the Twenty API. Timeline activities represent events or actions related to people, companies, opportunities, tasks, workflows, and other linked records within the system. This node is useful for tracking and logging specific events or interactions in a structured timeline format.

Common scenarios include:

  • Logging an event such as a meeting, call, or email interaction associated with a person or company.
  • Creating custom timeline entries for workflow runs or tasks to track progress or status changes.
  • Adding notes or metadata to timeline activities for audit or reporting purposes.

For example, you could use this node to record when a sales call happened with a prospect (Person Id), including details about the call (Properties) and linking it to an opportunity or task.

Properties

Name Meaning
Depth Determines how much nested related object information to include in the response: 0 (only primary object), 1 (primary + directly related objects), 2 (primary + related objects + their related objects).
Person Id The identifier of the person associated with the timeline activity.
Properties JSON object containing detailed event information or custom data relevant to the timeline activity.
Name The name/title of the event or timeline activity.
Happens At The date/time when the event occurred or was created.
Workspace Member Id Identifier for the workspace member related to the activity.
Linked Record Cached Name Cached display name of the linked record for quick reference.
Company Id Identifier of the company associated with the timeline activity.
Opportunity Id Identifier of the opportunity linked to the timeline activity.
Note Id Identifier of a note linked to the timeline activity.
Task Id Identifier of a task linked to the timeline activity.
Workflow Id Identifier of the workflow associated with the timeline activity.
Workflow Version Id Identifier of the specific version of the workflow.
Workflow Run Id Identifier of the workflow run instance related to the timeline activity.
Linked Object Metadata Id Identifier for metadata of the linked object.
Linked Record Id Identifier of the linked record associated with the timeline activity.

Output

The node outputs a JSON object representing the newly created timeline activity. This includes all the properties sent in the request along with any additional metadata or identifiers assigned by the API. The output structure reflects the depth level specified, potentially including nested related objects depending on the Depth property.

If binary data were involved (not indicated here), it would typically represent attachments or files related to the timeline activity, but this node focuses on JSON data only.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • The node uses the base URL configured via credentials to send requests.
  • No additional external dependencies are indicated beyond the Twenty API service.

Troubleshooting

  • Missing Required Fields: Ensure that mandatory fields like name and personId (or other relevant IDs) are provided; otherwise, the API may reject the request.
  • Invalid JSON in Properties: The Properties field expects valid JSON. Invalid JSON syntax will cause parsing errors.
  • Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Incorrect Depth Value: Using unsupported depth values may result in unexpected responses or errors.
  • API Rate Limits: Frequent calls might hit rate limits imposed by the API; handle such errors by retrying after some delay.

Links and References

  • Twenty API Documentation (hypothetical link)
  • JSON formatting guidelines for the Properties field.
  • n8n documentation on using API key credentials and configuring nodes.

Discussion