ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to create a new message in a ChatWoot conversation using the Messages API. It is useful for automating communication workflows, such as sending automated replies, notifications, or updates within an existing ChatWoot inbox and conversation. For example, you could use this node to send a follow-up message to a customer after they submit a support request, or to notify a user when their ticket status changes.

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 is created. Identifies the sender.
Conversation Id Number The numeric ID of the conversation where the message will be posted.
Content String The content of the message to be sent.
Echo Id String A temporary identifier that will be echoed back via websockets for tracking purposes.

Output

The node outputs a JSON object containing the response from the ChatWoot Messages API after creating the message. The structure typically includes details about the newly created message, such as its ID, content, timestamps, and related metadata. The exact fields depend on the ChatWoot API's response schema.

Example output:

{
  "id": 12345,
  "content": "Your message text",
  "conversation_id": 67890,
  "inbox_id": "abcde",
  "contact_id": "user-001",
  "echo_id": "temp-xyz",
  "created_at": "2024-06-01T12:34:56Z",
  // ...other metadata fields
}

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • API Credentials: You must configure n8n credentials named chatwootApi, which should include at least the base URL (url) and authentication details for your ChatWoot account.
  • n8n Configuration: No additional configuration is required beyond setting up the credentials.

Troubleshooting

  • Missing or Invalid Credentials:
    Error: "401 Unauthorized" or similar.
    Resolution: Ensure your chatwootApi credentials are correctly set up in n8n and have sufficient permissions.

  • Invalid Identifiers:
    Error: "404 Not Found" or "Invalid inbox/contact/conversation ID".
    Resolution: Double-check that the provided Inbox Identifier, Contact Identifier, and Conversation Id exist and are correct.

  • Empty Content:
    Error: "Content cannot be blank" or similar.
    Resolution: Make sure the Content property is not empty.

  • Network Issues:
    Error: "Network error" or timeouts.
    Resolution: Verify network connectivity between n8n and your ChatWoot instance.

Links and References

Discussion