Actions11
- Account Actions
- Contact Actions
- Public Actions
Overview
This node updates (patches) a contact in ChatWoot via its API. It is designed for scenarios where you need to modify existing contact information, such as updating names, emails, phone numbers, or custom attributes. This is useful for keeping your ChatWoot contact database synchronized with other systems, automating CRM workflows, or enriching contact data from external sources.
Example use cases:
- Automatically update a contact's email or phone number when it changes in another system.
- Add or modify custom attributes on a contact based on user actions or events.
- Integrate ChatWoot contacts with marketing automation or support ticketing tools.
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 authentication). |
| Access Token | string | The API token for ChatWoot (required if using parameter-based authentication). |
| Account ID | string | (Optional) Reference to a specific account; overrides credentials if provided. |
| Source ID | string | Internal source contact identifier, used for search; should be URL-escaped or HEX. |
| Contact ID | number | The unique identifier of the contact to update (required). |
| Contact Identifier | string | (Optional) External API contact identifier. |
| Name | string | The name of the contact. |
| Inbox ID | string | The inbox associated with the contact. |
| Phone Number | string | The contact's phone number. |
| string | The contact's email address. | |
| Custom Attributes | fixedCollection | Key-value pairs for custom attributes to set on the contact. |
Output
The node outputs a JSON object representing the updated contact. The structure typically includes fields such as:
{
"id": 123,
"name": "Contact Name",
"email": "email@domain.com",
"phone_number": "+1234567890",
"inbox_id": "inbox-id",
"custom_attributes": {
"key1": "value1",
"key2": "value2"
},
...
}
If an error occurs and "Continue On Fail" is enabled, the output will include an error field with the error message.
Dependencies
- ChatWoot Instance: You must have access to a running ChatWoot server.
- API Credentials: Either provide the BaseUrl and Access Token directly, or use predefined n8n credentials (
chatWootTokenApi). - n8n Configuration: If using predefined credentials, ensure they are configured in n8n under the correct credential type.
Troubleshooting
Common Issues:
- Invalid Credentials: If the access token or base URL is incorrect, authentication will fail.
- Missing Required Fields: Not providing a required property (e.g., Contact ID) will result in an error.
- Incorrect Field Types: Supplying a string instead of a number for Contact ID, or malformed custom attributes, may cause errors.
- Network/Server Errors: If the ChatWoot server is unreachable, you'll receive connection errors.
Error Messages:
"Authentication failed": Check your access token and base URL."Contact not found": Ensure the Contact ID exists in ChatWoot."Missing required parameter": Double-check that all required fields are filled."Invalid attribute key/value": Make sure custom attributes are properly formatted.