TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation updates a single Message Channel object in the connected system via an API. It allows modifying various attributes of a message channel such as synchronization settings, visibility, type, and other metadata. This is useful for keeping message channel data up to date, managing sync behavior, or adjusting how messages are handled and displayed.

Practical examples include:

  • Changing the sync status or stage of a message channel to control data fetching.
  • Updating the channel's visibility level to restrict or expand access.
  • Enabling or disabling automatic contact creation based on email activity.
  • Adjusting filters like excluding group emails or non-professional emails from sync.

Properties

Name Meaning
Id The unique identifier of the message channel object to update.
Depth Level of nested related objects to include in the response: 0 (only primary), 1 (primary + directly related), 2 (primary + related + their related).
Synced At Timestamp string representing the last time the channel was synced.
Connected Account Id Identifier of the connected account associated with this message channel.
Throttle Failure Count Number indicating how many times throttling failures have occurred during sync attempts.
Sync Stage Started At Timestamp string marking when the current sync stage started.
Sync Stage Current stage of the sync process. 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 sync process. Options: ONGOING, NOT SYNCED, ACTIVE, FAILED INSUFFICIENT PERMISSIONS, FAILED UNKNOWN.
Sync Cursor String cursor used to track the last position in sync operations.
Is Sync Enabled Boolean flag indicating if syncing is enabled for this channel.
Exclude Group Emails Boolean flag to exclude group emails from sync.
Exclude Non Professional Emails Boolean flag to exclude non-professional emails from sync.
Contact Auto Creation Policy Policy for automatically creating People records when sending or receiving emails. 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 String handle or identifier for the channel.
Visibility Visibility level of the channel. Options: METADATA, SUBJECT, SHARE EVERYTHING.

Output

The output JSON contains the updated message channel object reflecting all changes made by the update operation. The structure includes the primary message channel fields and, depending on the Depth parameter, may include nested related objects up to two levels deep.

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

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the external service managing message channels.
  • The base URL for API requests is set dynamically from credentials.
  • The node depends on the external Twenty API (or similar) to perform update operations on message channels.

Troubleshooting

  • Invalid Id: If the provided Id does not correspond to an existing message channel, the API will likely return a "Not Found" error. Verify the Id before updating.
  • Permission Errors: Sync status can fail due to insufficient permissions; ensure the API key has adequate rights.
  • Invalid Property Values: Providing unsupported values for options like syncStage, syncStatus, or visibility may cause validation errors.
  • Network Issues: Connectivity problems can cause request failures; check network and API endpoint availability.
  • Throttling: High throttle failure counts indicate rate limiting; consider reducing request frequency or handling retries.

Links and References

Discussion