ChatWoot icon

ChatWoot

Consume ChatWoot API

Overview

The ChatWoot node for n8n allows you to interact with the ChatWoot API. Specifically, when using the Contact resource and the Get Contact Details operation, this node retrieves detailed information about a specific contact in your ChatWoot account. This is useful for automating workflows that require fetching user or customer details from ChatWoot, such as enriching CRM records, triggering follow-up actions based on contact data, or integrating ChatWoot contacts with other systems.

Example scenarios:

  • Automatically pulling contact details into a Google Sheet for reporting.
  • Enriching support tickets in another system with ChatWoot contact information.
  • Triggering personalized emails based on contact attributes fetched from ChatWoot.

Properties

Below are the input properties relevant to the Contact resource and Get Contact Details 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).
Access Token string Your ChatWoot access token. Required if using parameter-based authentication.
Account ID string (Optional) The Account ID reference. Overrides credentials if provided.
Contact ID number The unique identifier of the contact whose details you want to retrieve.

Output

The output will be a JSON object containing the details of the requested contact. While the exact structure depends on the ChatWoot API response, typical fields may include:

{
  "id": 123,
  "name": "John Doe",
  "email": "john@example.com",
  "phone_number": "+1234567890",
  "created_at": "2023-01-01T12:00:00Z",
  "updated_at": "2023-01-02T15:30:00Z",
  // ...other contact-specific fields
}
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

Dependencies

  • External Service: Requires access to a ChatWoot instance.
  • API Key: You must provide a valid ChatWoot Access Token, either via direct input or through n8n credentials.
  • n8n Credentials: Optionally, you can use 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 a required Contact ID will result in an error.
  • Incorrect Account ID: Supplying an invalid Account ID may cause the request to fail or return no data.

Error Messages:

  • "Authentication failed": Check your Access Token and BaseUrl.
  • "Contact not found": Ensure the Contact ID exists in your ChatWoot account.
  • "Missing required parameter: Contact ID": Make sure to provide the Contact ID property.

How to resolve:

  • Double-check all input values, especially tokens and IDs.
  • Verify that your ChatWoot instance is accessible from the n8n server.

Links and References

Discussion