TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation creates a new message channel, which can represent communication channels such as email or SMS. It is useful for integrating and managing messaging channels within workflows, enabling automated creation and configuration of these channels in an external system.

Typical use cases include:

  • Automatically setting up new email or SMS channels when onboarding users or accounts.
  • Managing synchronization settings and visibility preferences for message channels.
  • Controlling how contacts are auto-created based on message activity.

For example, you might create an email channel with specific sync settings enabled to start capturing and processing emails automatically.

Properties

Name Meaning
Depth Determines the level of nested related objects included in the response: 0 (primary object only), 1 (primary + directly related objects), 2 (primary + related objects + their related objects).
Synced At The last synchronization date/time for the message channel.
Connected Account Id Identifier for the connected account associated with this message channel.
Throttle Failure Count Number of times throttling failures have occurred during sync attempts.
Sync Stage Started At Timestamp indicating when the current sync stage started.
Sync Stage Current synchronization stage of the message channel. Options: FULL MESSAGE LIST FETCH PENDING, PARTIAL MESSAGE LIST FETCH PENDING, MESSAGE LIST FETCH ONGOING, MESSAGES IMPORT PENDING, MESSAGES IMPORT ONGOING, FAILED.
Sync Status Status of the synchronization process. Options: ONGOING, NOT SYNCED, ACTIVE, FAILED INSUFFICIENT PERMISSIONS, FAILED UNKNOWN.
Sync Cursor Cursor string representing the last position in the sync process.
Is Sync Enabled Boolean flag indicating whether synchronization is enabled for this channel.
Exclude Group Emails Boolean flag to exclude group emails from the channel.
Exclude Non Professional Emails Boolean flag to exclude non-professional emails from the channel.
Contact Auto Creation Policy Policy for automatically creating contact records based on email activity. Options: SENT AND RECEIVED, SENT, NONE.
Is Contact Auto Creation Enabled Boolean flag indicating if automatic contact creation is enabled.
Type Channel type. Options: Email, Sms.
Handle A string handle or identifier for the channel.
Visibility Visibility level of the channel data. Options: METADATA, SUBJECT, SHARE EVERYTHING.

Output

The output JSON contains the newly created message channel object, including all properties sent and any additional metadata returned by the API. The structure reflects the channel's configuration, sync status, and related information depending on the requested depth.

If binary data were involved (not indicated here), it would typically represent attachments or media related to messages, but this operation focuses on channel creation metadata only.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the external Twenty API.
  • The node uses the base URL and headers set from the credentials.
  • No other external dependencies are indicated.

Troubleshooting

  • Invalid or missing authentication: Ensure that the API key credential is correctly configured and has permissions to create message channels.
  • Validation errors: Check that required fields like type and handle are provided and valid.
  • Sync-related errors: If sync stages or statuses are invalid or inconsistent, verify the values against allowed options.
  • API rate limits: The throttle failure count tracks failed attempts due to rate limiting; consider adding delays or retries if this count increases.
  • Unexpected response structure: Adjust the depth property to control the amount of nested data returned, which may affect payload size and parsing.

Links and References

Discussion