TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node allows you to create a new workflow run in the target system. It is useful when you want to programmatically trigger or register a workflow execution with specific parameters such as status, timing, output data, and context information. Typical use cases include initiating workflows from other automation processes, testing workflow executions, or logging workflow runs with custom metadata.

For example, you might use this node to start a workflow run with a predefined input payload and track its status or to simulate a workflow run for debugging purposes by specifying start and end times.

Properties

Name Meaning
Depth Determines how much nested related object data to include in the response: 0 (only primary object), 1 (primary + directly related objects), or 2 (primary + related + their related objects).
Workflow Version Id The identifier of the specific version of the workflow to run.
Workflow Id The unique identifier of the workflow to run.
Position Numeric position of the workflow run, possibly used for ordering or indexing runs.
Output JSON object representing the output data of the workflow run.
Created By JSON object describing the executor or initiator of the workflow run.
Status Current status of the workflow run. Options are: NOT STARTED, RUNNING, COMPLETED, FAILED.
Ended At Timestamp string indicating when the workflow run ended.
Name Name assigned to the workflow run.
Started At Timestamp string indicating when the workflow run started.
Context JSON object containing additional contextual information relevant to the workflow run.

Output

The node outputs a JSON object representing the newly created workflow run, including all properties sent and any additional metadata returned by the API. The structure reflects the workflow run's details such as its ID, status, timestamps, output data, and related nested objects depending on the specified depth.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential to authenticate requests to the external service.
  • The node uses a base URL configured via credentials to connect to the Twenty API.
  • The node depends on the @devlikeapro/n8n-openapi-node package and a bundled OpenAPI specification file (twenty-v1.0.3-openapi.json) to build request properties and handle communication.

Troubleshooting

  • Invalid or missing workflowId/workflowVersionId: Ensure that valid identifiers are provided; otherwise, the API may reject the creation request.
  • Malformed JSON in Output, Created By, or Context fields: Since these fields expect JSON strings parsed into objects, invalid JSON syntax will cause errors. Validate JSON formatting before sending.
  • Incorrect status values: Only the predefined statuses (NOT_STARTED, RUNNING, COMPLETED, FAILED) are accepted. Using unsupported values will result in errors.
  • API authentication failures: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Date/time format issues: The startedAt and endedAt fields should be valid timestamp strings; incorrect formats may cause rejection.

Links and References

Discussion