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
This node updates a custom attribute within a specific account in ChatWoot. It is designed for scenarios where you need to modify metadata or custom fields associated with an account, such as updating the display name, type, description, key, values, or model of a custom attribute. This is useful for organizations that use ChatWoot and want to programmatically manage or synchronize custom attributes across their accounts.
Example Use Cases:
- Automatically update a custom field when syncing data from another CRM.
- Change the display type or allowed values of an attribute based on business logic.
- Update attribute descriptions or keys as part of a migration or cleanup process.
Properties
| Display Name | Type | Description |
|---|---|---|
| Account Id | Number | The numeric ID of the account where the custom attribute will be updated. |
| Id | Number | The ID of the custom attribute to be updated. |
| Attribute Display Name | String | The display name of the attribute. |
| Attribute Display Type | Number | The display type of the attribute (text-0, number-1, currency-2, percent-3, link-4, date-5, list-6, checkbox-7). |
| Attribute Description | String | A description for the attribute. |
| Attribute Key | String | The unique key value for the attribute. |
| Attribute Values | JSON | The possible values for the attribute, provided as a JSON array. |
| Attribute Model | Number | The attribute type (conversation_attribute-0, contact_attribute-1). |
Output
The node outputs a json object containing the response from the ChatWoot API after updating the custom attribute. The structure of this output typically includes details about the updated attribute, such as its ID, display name, type, description, key, values, and model. The exact structure depends on the ChatWoot API's response format.
Example Output Structure:
{
"id": 123,
"account_id": 456,
"attribute_display_name": "Priority",
"attribute_display_type": 0,
"attribute_description": "Indicates ticket priority",
"attribute_key": "priority",
"attribute_values": ["High", "Medium", "Low"],
"attribute_model": 0,
// ...other fields returned by the API
}
Dependencies
- External Service: Requires access to a ChatWoot instance with API enabled.
- API Credentials: You must configure n8n credentials named
chatwootApi, which should include at least the base URL (url) and authentication details for your ChatWoot instance.
Troubleshooting
Common Issues:
- Invalid Account or Attribute ID: If the provided Account Id or Id does not exist, the API may return a "Not Found" or similar error.
- Authentication Errors: Missing or incorrect API credentials will result in authentication failures.
- Malformed Attribute Values: If
Attribute Valuesis not valid JSON, the request may fail. - Insufficient Permissions: The API user must have permission to update custom attributes in the specified account.
Error Messages & Resolutions:
"401 Unauthorized": Check your API credentials and ensure they are correctly configured in n8n."404 Not Found": Verify that both the Account Id and Attribute Id are correct and exist in ChatWoot."400 Bad Request": Ensure all required fields are filled and thatAttribute Valuesis valid JSON.