ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

The ChatWoot node for n8n enables integration with the ChatWoot API, specifically allowing users to search for contacts within their ChatWoot account. The "Search Contacts" operation under the "Contact" resource lets you query contacts using a search string, making it useful for automating workflows that require contact lookups, filtering, or enrichment based on dynamic criteria.

Common scenarios:

  • Automatically finding and retrieving contact details in ChatWoot based on user input or data from other systems.
  • Enriching leads or support tickets by fetching associated contact information.
  • Building automated processes that depend on searching and matching contacts in your ChatWoot workspace.

Practical example:
You could use this node to search for a customer by email or name when a new support ticket is created, then route the ticket or update records based on the found contact's details.


Properties

Name Type Meaning
Authentication options Selects the authentication method: either direct parameters or predefined credentials.
BaseUrl string The base URL of your ChatWoot instance (required if using parameter-based auth).
Access Token string The ChatWoot access token (required if using parameter-based auth).
Account ID string (Optional) The specific ChatWoot account ID to use for the search.
Query string The text query used to search for contacts.

Output

The output will be an array of JSON objects, each representing a contact that matches the search query. Each object typically contains fields such as:

{
  "id": 123,
  "name": "John Doe",
  "email": "john@example.com",
  // ...other contact properties returned by ChatWoot
}
  • If an error occurs and "Continue On Fail" is enabled, the output may include objects with an error field containing the error message.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Key: Needs a valid ChatWoot access token.
  • n8n Credentials: Can use either direct parameters (BaseUrl + Access Token) or predefined ChatWoot credentials configured in n8n.

Troubleshooting

Common issues:

  • Invalid credentials: If the access token or base URL is incorrect, authentication will fail.
  • Missing required fields: Not providing the "Query" property will result in errors.
  • Account ID mismatch: Using an incorrect or missing Account ID may lead to no results or permission errors.

Error messages:

  • "Authentication failed": Check your access token and base URL.
  • "Resource not found": Ensure the Account ID and BaseUrl are correct.
  • "Missing required parameter: Query": Make sure to provide a search query.

Links and References

Discussion