ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

This node operation updates an existing custom filter in the ChatWoot system. Custom filters allow users to save specific queries for filtering conversations, contacts, or reports according to their needs. By updating a custom filter, users can modify its name, type, and the underlying query that defines the filter criteria.

Common scenarios where this node is beneficial include:

  • Adjusting saved filters to reflect new business requirements without recreating them.
  • Renaming filters for better clarity or organization.
  • Changing the filter type or query to refine data views in ChatWoot dashboards or reports.

For example, a user might update a "High Priority Conversations" filter to include additional conditions or rename it to "Urgent Conversations" after changing team priorities.

Properties

Name Meaning
Account Id The numeric ID of the account to which the custom filter belongs.
Custom Filter Id The numeric ID of the custom filter that you want to update.
Name The new name for the custom filter.
Type The category of the custom filter. Options: Conversation, Contact, Report.
Query A JSON object representing the query that defines the filter criteria to be saved.

Output

The node outputs JSON data representing the updated custom filter as returned by the ChatWoot API. This typically includes details such as the filter's ID, name, type, query, and possibly metadata like timestamps or status.

If the node supports binary data output (not indicated here), it would represent attachments or files related to the filter, but this operation primarily deals with JSON data.

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 or Filter ID: If the provided account or custom filter ID does not exist, the API will return an error. Verify IDs are correct.
  • Malformed Query JSON: The query property must be valid JSON. Invalid JSON will cause parsing errors.
  • Insufficient Permissions: Ensure the API token has permissions to update custom filters.
  • Network Issues: Connectivity problems with the ChatWoot server will prevent updates.
  • Missing Required Fields: Both account_id and custom_filter_id are required; omitting them will cause errors.

To resolve errors, check input values, validate JSON syntax, and confirm API credentials and permissions.

Links and References

Discussion