ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Update A Message operation in the Messages API resource allows you to update an existing message within a specific conversation in ChatWoot. This is useful for scenarios where you need to modify the content or metadata of a previously sent message, such as correcting information, updating form submissions, or handling interactive workflows.

Practical examples:

  • Correcting a typo or error in a previously sent message.
  • Updating submitted form values attached to a message after user feedback.
  • Modifying message data as part of an automated workflow in customer support.

Properties

Display Name Type Description
Inbox Identifier String The identifier obtained from the API inbox channel. Required to specify the target inbox.
Contact Identifier String The source ID of the contact, obtained when the contact was created. Required for context.
Conversation Id Number The numeric ID of the conversation containing the message to be updated.
Message Id Number The numeric ID of the message you want to update.
Submitted Values JSON Key-value pairs representing new or updated data to attach to the message.

Output

The node outputs a json object containing the response from the ChatWoot API after updating the message. The structure typically includes:

  • Updated message details (such as IDs, content, timestamps)
  • Any metadata or submitted values that were changed
  • Status indicators (e.g., success, error)

Note: The exact output fields depend on the ChatWoot API's response for the message update endpoint.

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • API Credentials: You must configure the chatwootApi credentials in n8n, including the base URL and authentication token.
  • n8n Configuration: Ensure the node has access to the required credentials and that the ChatWoot API is reachable from your n8n environment.

Troubleshooting

Common Issues:

  • Invalid Identifiers: If any of the required identifiers (Inbox, Contact, Conversation, Message) are incorrect or missing, the API will likely return a "Not Found" or "Invalid Parameter" error.
  • Authentication Errors: Missing or incorrect API credentials will result in authentication failures.
  • Malformed JSON: If the "Submitted Values" property contains invalid JSON, the request may fail or be rejected by the API.

Error Messages & Resolutions:

  • "404 Not Found": Check that all provided IDs (inbox, contact, conversation, message) exist and are correct.
  • "401 Unauthorized": Verify that your API credentials are set up correctly in n8n.
  • "400 Bad Request": Ensure that the "Submitted Values" field contains valid JSON and all required properties are present.

Links and References

Discussion