ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

The "Update A Message" operation in the Messages API resource allows users to modify an existing message within a specific conversation. This is useful when you need to correct, append, or otherwise change the content or metadata of a message that has already been sent or stored. Typical use cases include updating message text for clarity, fixing typos, or adding additional structured data after the initial message creation.

For example, if a customer support agent sends a message and later realizes it contains incorrect information, they can use this operation to update the message without needing to send a new one.

Properties

Name Meaning
Inbox Identifier The unique identifier of the inbox channel where the message resides, obtained from the API.
Contact Identifier The source ID of the contact associated with the message, obtained when the contact was created.
Conversation Id The numeric ID representing the conversation containing the message.
Message Id The numeric ID of the message to be updated.
Submitted Values A JSON object containing the fields and values to update on the message.

Output

The node outputs a JSON object representing the updated message as returned by the API. This typically includes the message's current state after the update, such as its content, timestamps, identifiers, and any other relevant metadata.

If the API supports binary data related to messages (e.g., attachments), the node would handle this accordingly, but based on the provided code and properties, the output focuses on JSON data describing the updated message.

Dependencies

  • Requires an API key credential for authenticating with the ChatWoot API.
  • The base URL for the API must be configured in the node credentials.
  • The node depends on the @devlikeapro/n8n-openapi-node package for OpenAPI integration.
  • The node uses a bundled OpenAPI specification (openapi.json) to define available operations and properties.

Troubleshooting

  • Invalid Identifiers: Errors may occur if the inbox, contact, conversation, or message IDs are incorrect or do not exist. Verify these IDs before running the node.
  • Authentication Failures: Ensure the API key credential is valid and has sufficient permissions to update messages.
  • Malformed JSON in Submitted Values: The submitted_values property expects valid JSON. Invalid JSON will cause parsing errors. Use proper JSON formatting.
  • API Endpoint Issues: If the base URL is misconfigured or the API service is down, requests will fail. Confirm the API endpoint is reachable.
  • Permission Denied: The authenticated user might lack rights to update certain messages. Check user roles and permissions in the ChatWoot system.

Links and References

Discussion