ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

This node allows you to add a new custom attribute to an account within the ChatWoot platform. Custom attributes are useful for extending account data with additional metadata tailored to your business needs, such as tagging accounts with specific labels, tracking extra numeric or textual information, or adding dates and links relevant to the account.

Common scenarios include:

  • Adding personalized fields to customer accounts for segmentation or reporting.
  • Tracking custom metrics or statuses that are not part of the default account schema.
  • Integrating external system data by storing unique keys and values as attributes.

For example, you might add a "Customer Tier" attribute with a list of possible values or a "Last Purchase Date" attribute of type date.

Properties

Name Meaning
Account Id The numeric ID of the account to which the custom attribute will be added.
Attribute Display Name The human-readable name of the attribute shown in the UI or reports.
Attribute Display Type The data type of the attribute's value. Options: 0 (text), 1 (number), 2 (currency), 3 (percent), 4 (link), 5 (date), 6 (list), 7 (checkbox).
Attribute Description A description explaining the purpose or usage of the attribute.
Attribute Key A unique key string identifying the attribute internally.
Attribute Values JSON array representing possible values for the attribute (useful especially if display type is list).
Attribute Model The model type indicating where the attribute applies: 0 for conversation attribute, 1 for contact attribute.

Output

The node outputs JSON data representing the response from the ChatWoot API after creating the custom attribute. This typically includes details of the newly created attribute such as its ID, key, display name, type, and other metadata confirming successful creation.

No binary data output is produced by 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.

Troubleshooting

  • Invalid Account Id: If the provided account ID does not exist or is incorrect, the API will return an error. Verify the account ID before running the node.
  • Duplicate Attribute Key: Attempting to add an attribute with a key that already exists may cause a conflict error. Use unique keys.
  • Incorrect Attribute Values Format: The attribute_values property expects valid JSON. Malformed JSON will cause parsing errors.
  • Authentication Errors: Ensure the API token is valid and has sufficient permissions to create custom attributes.
  • Unsupported Display Type: Using a display type outside the defined range (0-7) may result in API rejection.

Links and References

Discussion