ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

This node allows updating a custom attribute within a specified account in ChatWoot. Custom attributes are metadata fields that can be attached to conversations or contacts to store additional information tailored to business needs. This operation is useful when you want to modify the properties of an existing custom attribute, such as changing its display name, type, description, key, possible values, or model type.

Practical examples include:

  • Renaming a custom attribute to better reflect its purpose.
  • Changing the attribute type from text to number or date to match updated data requirements.
  • Updating the list of allowed values for an attribute used as a dropdown.
  • Modifying the attribute’s description to provide clearer context for users.

Properties

Name Meaning
Account Id The numeric ID of the account where the custom attribute exists and will be updated.
Id The unique numeric ID of the custom attribute to update.
Attribute Display Name The new display name for the custom attribute (string).
Attribute Display Type The display type of the attribute. Options: 0 (text), 1 (number), 2 (currency), 3 (percent), 4 (link), 5 (date), 6 (list), 7 (checkbox).
Attribute Description A textual description explaining the purpose or details of the attribute.
Attribute Key The unique key identifier for the attribute (string).
Attribute Values JSON array representing the possible values for the attribute (used mainly if the type is list).
Attribute Model The model type indicating whether the attribute applies to conversations (0) or contacts (1).

Output

The node outputs the response from the ChatWoot API after attempting to update the custom attribute. The output is structured as JSON containing the updated attribute details or error information if the update failed.

If the API supports binary data in responses, it would typically relate to attachments or media, but this node focuses on JSON metadata updates only.

Dependencies

  • Requires an active connection to the ChatWoot API.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The base URL for the ChatWoot instance must be set in the credentials configuration.

Troubleshooting

  • Invalid Account Id or Custom Attribute Id: If these IDs do not exist or are incorrect, the API will return an error. Verify the IDs before running the node.
  • Incorrect Attribute Display Type: Using a number outside the defined range (0-7) may cause validation errors.
  • Malformed JSON in Attribute Values: Ensure the JSON string for attribute values is valid and correctly formatted.
  • Authentication Errors: Check that the API key/token is valid and has sufficient permissions.
  • Network Issues: Confirm that the ChatWoot instance URL is reachable from the n8n environment.

Common error messages usually come directly from the ChatWoot API and should be interpreted according to their content, e.g., "Not Found" for invalid IDs or "Unauthorized" for credential issues.

Links and References

Discussion