ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Custom Attributes → Add New Custom Attribute To Account

AI-generated

Overview

This node operation 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 boolean flags.

Common scenarios include:

  • Adding personalized fields to customer accounts for segmentation or targeted marketing.
  • Storing additional identifiers or notes that are not part of the default account schema.
  • Tracking custom metrics or statuses relevant to your workflow.

For example, you might add a "Customer Tier" attribute with values like "Gold", "Silver", or "Bronze" or a "Last Purchase Date" attribute to enrich account profiles.

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 type of the attribute's value display. 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 details of the attribute.
Attribute Key A unique key identifier for the attribute used internally to reference it.
Attribute Values JSON array representing possible values for the attribute (useful for list types or predefined options).
Attribute Model The model/type of attribute: 0 for conversation attribute, 1 for contact attribute.

Output

The node outputs JSON data representing the result of the API call to add the custom attribute. This typically includes confirmation details such as the created attribute's ID, its properties, and status. There is no binary output.

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 conflicts or errors. 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 modify account attributes.
  • Unsupported Attribute Display Type: Using a number outside the defined range (0-7) for display type may lead to unexpected behavior.

Links and References

Discussion