ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

The ChatWoot node for n8n enables you to interact with the ChatWoot API, specifically to create public messages within a conversation. This is useful for automating customer support workflows, sending automated replies, or integrating ChatWoot messaging into broader business processes.

Common scenarios:

  • Automatically posting messages to a ChatWoot conversation when a new ticket is created in another system.
  • Sending notifications or updates to customers via ChatWoot from other automation triggers.
  • Integrating ChatWoot messaging with CRM or helpdesk systems.

Example:
When a new order is placed on your e-commerce site, use this node to send an order confirmation message directly to the customer's ChatWoot conversation.


Properties

Below are the input properties relevant for the Public → Create Message operation:

Display Name Type Description
Authentication options Select how to authenticate: either by entering parameters manually or using predefined credentials.
BaseUrl string The base URL of your ChatWoot instance (e.g., https://chatwoot.org). Required if using parameter-based authentication.
Source ID string Internal source contact identifier, used for search. Should be URL-escaped or in HEX format.
Inbox Identifier string The identifier of the inbox where the message will be sent.
Conversation ID string The ID of the conversation to which the message will be added.
Content string The text content of the message to be sent.

Output

The node outputs a JSON object representing the result of the message creation operation. The structure typically includes:

{
  "id": "string",                // Unique identifier of the created message
  "content": "string",           // The message content as sent
  "conversation_id": "string",   // The conversation ID the message was posted to
  "inbox_id": "string",          // The inbox identifier
  "created_at": "timestamp",     // Timestamp of message creation
  ...                            // Additional fields as returned by the ChatWoot API
}

If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message.


Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • Authentication: Either via manually provided BaseUrl and Token, or via predefined ChatWoot credentials configured in n8n.
  • n8n Configuration: If using predefined credentials, ensure the credential type chatWootTokenApi is set up in n8n.

Troubleshooting

Common Issues:

  • Invalid Credentials: If authentication fails, check that your token and base URL are correct.
  • Missing Required Fields: Ensure all required fields (Inbox Identifier, Conversation ID, Content) are provided.
  • Incorrect Source ID Format: The Source ID should be properly URL-escaped or in HEX format.

Error Messages:

  • "Authentication failed": Indicates invalid or missing credentials. Double-check your authentication method and values.
  • "Resource not found": The specified conversation or inbox does not exist. Verify the IDs.
  • "Field is required": A required property is missing. Check that all mandatory fields are filled.

Links and References

Discussion