ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

The ChatWoot node for n8n enables integration with the ChatWoot API, specifically allowing you to retrieve contact details using the "Public" resource and the "Get Contact Details" operation. This is useful in scenarios where you need to fetch information about a contact based on an internal source identifier, such as automating customer support workflows, enriching CRM data, or syncing contact information between systems.

Practical Example:
You might use this node to automatically look up a user's details in ChatWoot when they submit a form on your website, or to pull contact information into another system for further processing.


Properties

Below are the input properties relevant to the "Public" resource and "Get Contact Details" operation:

Display Name Type Description
Authentication options Select how to authenticate: either by providing parameters directly 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 associated with the contact. Required for public resource operations.

Output

The output will be a JSON object containing the contact details retrieved from ChatWoot. The structure typically includes fields such as:

{
  "id": "string",
  "name": "string",
  "email": "string",
  "phone_number": "string",
  "identifier": "string",
  "inbox_id": "string",
  // ...other contact-related fields as provided by ChatWoot
}

If an error occurs and "Continue On Fail" is enabled, the output may include:

{
  "error": "Error message"
}

Note: The exact fields depend on the ChatWoot API response.


Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • Authentication: Either via direct parameters (BaseUrl, Access Token) or 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, ensure that the BaseUrl and Access Token are correct, or that the predefined credentials are properly configured.
  • Missing Required Fields: Ensure that "Source ID" and "Inbox Identifier" are provided.
  • API Errors: If the ChatWoot API returns an error (e.g., contact not found), the node will output an error message if "Continue On Fail" is enabled, or stop execution otherwise.

Common Error Messages:

  • "Authentication failed": Check your credentials and BaseUrl.
  • "Contact not found": Verify the Source ID and Inbox Identifier.
  • "Missing required property": Make sure all required fields are filled.

Links and References

Discussion