ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

This n8n node allows you to create a new contact in Chatwoot via the "Public" resource and the "Create Contact" operation. It is useful for integrating external systems (like CRMs, web forms, or marketing tools) with Chatwoot, enabling automated creation of contacts based on incoming data. For example, when a user submits a form on your website, this node can automatically add them as a contact in your Chatwoot instance.

Properties

Name Type Meaning
Authentication options Selects the authentication method: either direct parameters or predefined Chatwoot 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.
Name string The name of the contact to be created.
Inbox ID string The ID of the inbox to associate with the contact.
Phone Number string The phone number of the contact.
E-Mail string The email address of the contact.
Custom Attributes fixedCollection Key-value pairs for custom attributes to set on the contact.
Inbox Identifier string Identifier for the inbox; required for public resource operations.

Output

The node outputs a JSON object representing the newly created contact in Chatwoot. The structure typically includes fields such as:

{
  "id": "string",
  "name": "string",
  "email": "string",
  "phone_number": "string",
  "inbox_id": "string",
  "custom_attributes": {
    "key1": "value1",
    "key2": "value2"
  },
  ...
}

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

Dependencies

  • Chatwoot Instance: You must have access to a running Chatwoot server.
  • API Credentials: Either provide the BaseUrl and Access Token directly, or use predefined Chatwoot credentials configured in n8n.
  • n8n Configuration: If using predefined credentials, ensure they are set up in n8n under "Credentials".

Troubleshooting

  • Authentication Errors:
    • Error Message: "Authentication failed" or similar.
      Resolution: Check that your API token and BaseUrl are correct, and that your credentials are active in n8n.
  • Missing Required Fields:
    • Error Message: "Inbox Identifier is required" or similar.
      Resolution: Ensure all required properties (especially Inbox Identifier) are provided.
  • Invalid Data Format:
    • Error Message: "Invalid email/phone number format".
      Resolution: Double-check the formatting of input fields like email and phone number.
  • Network Issues:
    • Error Message: "Could not reach Chatwoot server".
      Resolution: Verify network connectivity and that the Chatwoot instance is accessible from n8n.

Links and References

Discussion