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 conversations, contacts, or reports, enabling quick access to frequently used filtered views. This operation is useful when you want to modify the parameters of a saved filter, such as changing its name, type, or the underlying query criteria.

Practical examples include:

  • Renaming a saved conversation filter to better reflect its purpose.
  • Changing the filter type from "conversation" to "contact" if the focus shifts.
  • Updating the query JSON to refine which items the filter captures.

Properties

Name Meaning
Account Id The numeric ID of the account where the custom filter exists.
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 criteria that define the filter's conditions.

Output

The node outputs JSON data representing the updated custom filter object as returned by the ChatWoot API. This typically includes the filter's ID, name, type, query details, and metadata confirming the update was successful.

If the node supports binary data output (not indicated here), it would represent any file or media content 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 can cause request failures.

Common error messages:

  • 404 Not Found: The specified custom filter or account does not exist.
  • 400 Bad Request: The input data is invalid, often due to malformed JSON or missing required fields.
  • 401 Unauthorized: Authentication failed; check API credentials.

Resolving these usually involves verifying input values, ensuring proper JSON formatting, and confirming API credentials.

Links and References

Discussion