ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

This node allows updating a custom attribute within a specified account in the ChatWoot system. Custom attributes are metadata fields that can be associated with accounts to store additional information such as user preferences, statuses, or other relevant data points.

Typical use cases include:

  • Modifying existing custom attributes to reflect changes in business logic or user data.
  • Updating attribute display properties like name, type, and description to improve clarity or UI presentation.
  • Changing attribute values dynamically based on workflow conditions.

For example, you might update a "Customer Tier" attribute from "Silver" to "Gold" after a purchase, or change an attribute's display type from text to number to better represent the data.

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 (e.g., "Customer Tier").
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 used internally.
Attribute Values JSON array representing possible or current values for the attribute.
Attribute Model The model type indicating the attribute context; options: 0 (conversation attribute), 1 (contact attribute).

Output

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

If the operation is successful, the json output typically includes fields such as:

  • Updated attribute ID
  • Updated display name, type, description, key, and values
  • Metadata about the update status

No binary data output is expected from this node.

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 Attribute Id: Ensure the provided IDs exist and belong to your ChatWoot instance.
  • Authentication Errors: Verify that the API key credential is valid and has sufficient permissions.
  • Malformed JSON in Attribute Values: When providing JSON for attribute values, ensure it is correctly formatted to avoid parsing errors.
  • Unsupported Attribute Display Type or Model: Use only the supported numeric codes as defined in the properties.
  • API Rate Limits or Network Issues: Check connectivity and API usage limits if requests fail intermittently.

Common error messages usually come directly from the ChatWoot API and should be interpreted accordingly, e.g., "Unauthorized", "Not Found", or "Bad Request".

Links and References

Discussion