TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node updates a single message object in the "Messages" resource. It allows users to modify various fields of an existing message by specifying its unique identifier. This operation is useful when you need to correct, enhance, or add information to a message record already stored in the system.

Common scenarios include:

  • Updating the subject or text content of a message after it has been created.
  • Adding or modifying metadata such as message thread ID or received date.
  • Adjusting message hierarchy by setting a header message ID.
  • Controlling the depth of related objects returned with the updated message for richer context.

Practical example:

  • A user wants to update the text and subject of a support ticket message after receiving additional information from the customer.
  • An automation workflow modifies the received date or associates the message with a different thread based on new processing logic.

Properties

Name Meaning
Id The unique identifier of the message object to update. This is required to specify which message will be modified.
Depth Determines how much nested related data to include in the response:
- 0: Only the primary message object.
- 1: Primary message plus directly related objects.
- 2: Includes related objects of related objects.
Header Message Id The ID of the message header to associate with this message, allowing hierarchical message relationships.
Subject The subject line or title of the message.
Text The main textual content of the message.
Message Thread Id Identifier for the message thread this message belongs to, enabling grouping of related messages.
Received At The date/time string representing when the message was received.

Output

The node outputs the updated message object in JSON format. The structure includes the primary message fields and, depending on the Depth property, may also contain nested related objects up to two levels deep. This enriched output helps downstream nodes or workflows access comprehensive message details immediately after the update.

If binary data were involved (not indicated here), it would typically represent attachments or media associated with the message, but this node focuses on JSON message data only.

Dependencies

  • Requires an API key credential to authenticate requests against the Twenty API service.
  • The base URL for API requests is configured dynamically from credentials.
  • The node uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Missing or invalid Id: The update operation requires a valid message ID. Ensure the Id property is set correctly; otherwise, the API will reject the request.
  • Invalid date format for Received At: If the Received At field is provided, it must conform to the expected date-time format accepted by the API.
  • Permission errors: Make sure the API key used has sufficient permissions to update messages.
  • Depth value out of range: Only values 0, 1, or 2 are supported for Depth. Using other values may cause unexpected results or errors.
  • Network or authentication failures: Verify network connectivity and that the API key credential is valid and active.

Links and References

Discussion