Actions100
- Accounts Actions
- Account Users Actions
- Agent Bots Actions
- Users Actions
- Inbox API Actions
- Contacts API Actions
- Conversations API Actions
- Messages API Actions
- CSAT Survey Page Actions
- Account Agent Bots Actions
- Agents Actions
- Canned Responses Actions
- Canned Response Actions
- Custom Attributes Actions
- Contacts Actions
- Contact Actions
- Automation Rule Actions
- Help Center Actions
- Conversations Actions
- Conversation Assignment Actions
- Conversation Labels Actions
- Inboxes Actions
- Messages Actions
- Integrations Actions
- Teams Actions
Overview
The ChatWoot - Contacts API: Update A Contact node allows you to update the details of an existing contact in your ChatWoot inbox. This is useful for keeping customer information up-to-date, such as when a user changes their email, phone number, or other profile attributes. Common scenarios include synchronizing contact data from external systems (like CRMs), updating user profiles after form submissions, or enriching contact records with additional metadata.
Example use cases:
- Automatically update a contact's email and name when they change it in your main application.
- Add or modify custom attributes (e.g., subscription status, preferences) for segmentation or automation.
- Update avatar images or phone numbers based on user actions.
Properties
| Display Name | Type | Description |
|---|---|---|
| Inbox Identifier | String | The identifier obtained from API inbox channel. Required to specify which inbox to update. |
| Contact Identifier | String | The source ID of the contact, obtained when the contact was created. Required. |
| Identifier | String | External identifier of the contact. Optional. |
| Identifier Hash | String | Identifier hash prepared for HMAC authentication. Optional. |
| String | Email address of the contact. Optional. | |
| Name | String | Name of the contact. Optional. |
| Phone Number | String | Phone number of the contact. Optional. |
| Avatar Url | String | URL to a JPEG or PNG file for the user's avatar. Optional. |
| Custom Attributes | JSON | Custom attributes of the customer, provided as a JSON object. Optional. |
Output
The node outputs a json field containing the updated contact's information as returned by the ChatWoot API. The structure typically includes:
- Updated contact fields (such as name, email, phone number, etc.)
- Any custom attributes that were set or modified
- System-generated fields like IDs, timestamps, etc.
Example output:
{
"id": 12345,
"name": "Jane Doe",
"email": "jane@example.com",
"phone_number": "+1234567890",
"avatar_url": "https://example.com/avatar.jpg",
"custom_attributes": {
"subscription_status": "active"
},
// ...other fields as provided by ChatWoot
}
Note: The exact output fields depend on the ChatWoot API response.
Dependencies
- External Service: Requires access to a ChatWoot instance with API enabled.
- API Key: You must provide valid ChatWoot API credentials (
chatwootApi) in n8n. - Environment Variable: The base URL for ChatWoot is taken from the credentials (
$credentials.url).
Troubleshooting
Common issues:
- Missing or invalid identifiers: If
Inbox IdentifierorContact Identifierare missing or incorrect, the API will likely return a "Not Found" or "Invalid Parameter" error. - Authentication errors: If the API key is missing or incorrect, you'll receive an authentication/authorization error.
- Malformed custom attributes: If
Custom Attributesis not valid JSON, the request may fail with a parsing error. - Invalid avatar URL: If the
Avatar Urldoes not point to a valid image, the update may be rejected.
Error messages and resolutions:
"404 Not Found": Check that both the Inbox Identifier and Contact Identifier are correct and exist in ChatWoot."401 Unauthorized": Verify your ChatWoot API credentials in n8n."400 Bad Request": Ensure all required fields are filled and that optional fields (like custom attributes) are correctly formatted.