ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions100

Overview

The Contact Create operation for the Contacts resource in this custom n8n node allows users to create a new contact in ChatWoot via its API. This is useful for automating the process of adding leads, customers, or any user data into your ChatWoot workspace from other systems (e.g., CRMs, web forms, marketing tools). For example, you could automatically add a new contact when someone fills out a signup form on your website.

Properties

Below are the supported input properties for this operation:

Display Name Type Description
Account Id Number The numeric ID of the account. Required.
Inbox Id Number The ID of the inbox to associate with the contact. Required.
Name String Name of the contact.
Email String Email address of the contact.
Phone Number String Phone number of the contact.
Avatar String Form data with the avatar image binary or use the avatar_url.
Avatar Url String URL to a JPEG or PNG file for the contact's avatar.
Identifier String A unique identifier for the contact in an external system.
Custom Attributes JSON An object for storing custom attributes (e.g., {"type":"customer", "age":30}).

Output

  • The node outputs a json field containing the response from the ChatWoot API after creating the contact.
  • The structure of the output will typically include details about the newly created contact, such as their ID, name, email, phone number, avatar information, and any custom attributes provided.
  • If the avatar is uploaded as binary data, the output may reference the resulting avatar URL or metadata, but the node does not output raw binary data directly.

Dependencies

  • External Service: Requires access to a ChatWoot instance with API enabled.
  • API Key/Credentials: You must configure the chatwootApi credentials in n8n, including the base URL (url) and authentication token.
  • n8n Configuration: Ensure the node is properly authenticated and that the required fields (Account Id, Inbox Id) are provided.

Troubleshooting

  • Missing Required Fields: If Account Id or Inbox Id are missing, the node will likely throw an error indicating required parameters are not set. Ensure all required fields are filled.
  • Invalid Credentials: Errors related to authentication (e.g., 401 Unauthorized) indicate issues with the provided ChatWoot API credentials. Double-check your API key and base URL.
  • Malformed Custom Attributes: If the Custom Attributes field is not valid JSON, the node may fail. Always provide a correctly formatted JSON object.
  • Avatar Upload Issues: If both avatar and avatar_url are empty or invalid, the contact may be created without an avatar, or the API may return an error if one is required.

Links and References

Discussion