TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation allows you to create a new version of a workflow in the target system. It is useful when you want to manage multiple versions of workflows, enabling you to draft, activate, deactivate, or archive specific workflow versions. This can be particularly beneficial for development and testing purposes, where you might want to maintain different iterations of a workflow without affecting the active production version.

Practical examples include:

  • Creating a draft version of a workflow to test new steps before activating it.
  • Archiving old workflow versions while keeping the current one active.
  • Managing workflow version positions to control execution order or priority.

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), or 2 (primary + directly related + their related objects).
Position Numeric position of the workflow version, which may influence ordering or priority.
Status The status of the workflow version. Options are: DRAFT, ACTIVE, DEACTIVATED, ARCHIVED.
Steps JSON object defining the steps of the workflow version. This should be a valid JSON structure representing the workflow's step configuration.
Trigger JSON object defining the trigger configuration for the workflow version. This should be a valid JSON structure specifying how the workflow is triggered.
Name The name assigned to this workflow version.
Workflow Id The identifier of the workflow to which this version belongs.

Output

The node outputs JSON data representing the newly created workflow version. This includes all details sent in the request plus any additional metadata returned by the API, such as unique identifiers, timestamps, and nested related objects depending on the Depth parameter.

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

Dependencies

  • Requires an API key credential to authenticate requests against the Twenty API.
  • The base URL for the API is configured via credentials.
  • The node uses the OpenAPI specification bundled internally to build request properties and handle routing.

Troubleshooting

  • Invalid JSON in Steps or Trigger: Since these fields expect JSON input, malformed JSON will cause errors. Ensure that the JSON is correctly formatted.
  • Missing Required Fields: Omitting mandatory fields like workflowId or name may result in API errors. Always provide these values.
  • Authentication Errors: If the API key or domain credentials are incorrect or missing, authentication will fail.
  • Invalid Status or Depth Values: Using unsupported values outside the provided options will cause validation errors.
  • API Rate Limits or Network Issues: Standard API connectivity issues may occur; verify network access and API limits.

Links and References

Discussion