Chatwoot icon

Chatwoot

Interact with Chatwoot API

Overview

This node interacts with the Chatwoot API to manage messages within conversations in a Chatwoot account. Specifically, for the Message - Delete operation, it deletes a message identified by its numeric ID from a specified conversation and account.

This operation is useful when you want to programmatically remove messages that are no longer relevant, were sent by mistake, or need to be purged for compliance reasons. For example, you might automate deleting outdated support messages or removing sensitive information after resolution.

Properties

Name Meaning
Account ID The numeric ID of the Chatwoot account where the message exists.
Conversation ID The numeric ID of the conversation containing the message to delete.
Message ID The numeric ID of the message to delete.
Continue on Fail Whether to continue executing subsequent items if this delete operation fails (true/false).

Output

  • The output JSON contains a single field success set to true upon successful deletion.
  • Example output:
{
  "success": true
}
  • No binary data is returned by this operation.

Dependencies

  • Requires an active connection to the Chatwoot API.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The base URL of the Chatwoot instance must be set in the credentials.
  • The node uses HTTP DELETE method to call the endpoint:
    /api/v1/accounts/{accountId}/conversations/{conversationId}/messages/{messageId}

Troubleshooting

  • Common issues:

    • Invalid or missing Account ID, Conversation ID, or Message ID will cause errors.
    • Insufficient permissions or invalid API token may result in authorization errors.
    • Trying to delete a message that does not exist will likely return a 404 error.
    • Network connectivity issues can cause request failures.
  • Error messages and resolutions:

    • "404 Not Found": Verify that the Account ID, Conversation ID, and Message ID are correct and that the message exists.
    • "401 Unauthorized" or "403 Forbidden": Check that the API key credential is valid and has sufficient permissions.
    • "Request failed" or timeout errors: Ensure network connectivity and that the Chatwoot server is reachable.
    • If Continue on Fail is false, the node execution will stop on error; setting it to true allows processing remaining items despite failures.

Links and References

Discussion