ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

This node allows you to create a new contact in ChatWoot via its Contacts API. It is useful for automating the process of adding customer or user information into your ChatWoot workspace, such as when integrating with other systems (CRMs, signup forms, etc.). For example, you could use this node to automatically add a new contact whenever a user signs up on your website.

Properties

The following input properties are supported for the "Create A Contact" operation in the "Contacts API" resource:

Display Name Type Description
Inbox Identifier String The identifier obtained from API inbox channel. (Required)
Identifier String External identifier of the contact.
Identifier Hash String Identifier hash prepared for HMAC authentication.
Email String Email of the contact.
Name String Name of the contact.
Phone Number String Phone number of the contact.
Avatar Url String The URL to a jpeg or png file for the user avatar.
Custom Attributes JSON Custom attributes of the customer (as a JSON object).

Output

The node returns the response from the ChatWoot API after creating the contact. The output will be available in the json field and typically includes details about the newly created contact, such as their ID, name, email, phone number, avatar URL, custom attributes, and any other metadata returned by the API.

Example output structure:

{
  "id": 12345,
  "name": "John Doe",
  "email": "john@example.com",
  "phone_number": "+1234567890",
  "avatar_url": "https://example.com/avatar.png",
  "custom_attributes": {
    "company": "Acme Inc"
  },
  // ...other fields as provided by ChatWoot
}

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • API Key: You must provide valid ChatWoot API credentials (chatwootApi) in n8n.
  • n8n Configuration: The base URL for ChatWoot should be set in the credentials configuration.

Troubleshooting

  • Missing Required Fields: If "Inbox Identifier" is not provided, the node will fail as it is required.
  • Invalid Credentials: If the API key or base URL is incorrect, you may receive authentication errors (e.g., 401 Unauthorized).
  • Malformed Custom Attributes: Ensure that "Custom Attributes" is valid JSON; otherwise, the request may fail.
  • Network Issues: Connection problems between n8n and ChatWoot can cause timeouts or connection errors.

Common error messages:

  • 401 Unauthorized: Check your API credentials and base URL.
  • 400 Bad Request: Verify all required fields are filled and data formats are correct.
  • 500 Internal Server Error: This may indicate an issue on the ChatWoot server side.

Links and References

Discussion