ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

The ChatWoot node for n8n allows you to interact with the ChatWoot API. Specifically, when using the Public resource and the Create Contact operation, this node enables you to create a new contact in your ChatWoot instance via the public API endpoint. This is useful for scenarios where you want to programmatically add contacts from external sources (such as web forms, integrations, or other automation workflows) into your ChatWoot system.

Practical examples:

  • Automatically adding users who fill out a website form as contacts in ChatWoot.
  • Integrating with another CRM or lead source to sync new leads into ChatWoot.
  • Creating contacts from incoming webhook data.

Properties

Below are the input properties relevant to the Public → Create Contact operation:

Display Name Type Description
Authentication options Choose between providing parameters directly or using predefined Chatwoot credentials.
BaseUrl string The base URL of your ChatWoot instance (e.g., https://chatwoot.org). Required if using parameter authentication.
Source ID string Internal source contact identifier, used for search. Should be URL-escaped or HEX.
Name string The name of the contact to create.
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 Add custom key-value attributes to the contact.
Inbox Identifier string Identifier for the inbox. This field is required for the Public resource.

Output

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

  • id: The unique identifier of the created contact.
  • name: The name of the contact.
  • email: The email address of the contact.
  • phone_number: The phone number of the contact.
  • custom_attributes: An object containing any custom attributes set during creation.
  • inbox_id: The associated inbox ID.
  • source_id: The internal source contact identifier.

Note: The exact output fields may vary depending on the ChatWoot API response.

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • Authentication: You must provide either:
    • A BaseUrl and Access Token (when using "Parameters" authentication), or
    • Predefined Chatwoot Credentials configured in n8n.
  • n8n Configuration: If using predefined credentials, ensure they are set up under n8n's credentials section.

Troubleshooting

Common Issues:

  • Invalid Credentials:
    Error message: Authentication failed or similar.
    Resolution: Double-check your BaseUrl and Access Token, or ensure your predefined credentials are correct.

  • Missing Required Fields:
    Error message: Inbox Identifier is required or similar.
    Resolution: Ensure all required fields, especially "Inbox Identifier", are filled.

  • API Endpoint Not Reachable:
    Error message: ENOTFOUND, ECONNREFUSED, or timeout errors.
    Resolution: Verify that the BaseUrl is correct and accessible from your n8n instance.

  • Continue On Fail:
    If enabled, errors for individual items will be returned in the output as { error: "error message" }.

Links and References

Discussion