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 appear in the filter results.

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 criteria that define the custom filter's behavior.

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 binary data were involved (not indicated here), it would represent file attachments or similar content, but this operation deals solely 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. Errors parsing this will cause the request to fail. Use proper JSON formatting.
  • Insufficient Permissions: Ensure the API token has rights to update custom filters on the specified account.
  • Network Issues: Connectivity problems with the ChatWoot server will prevent updates. Check network and endpoint availability.

Common error messages might include:

  • "Not Found" – The specified custom filter or account does not exist.
  • "Unauthorized" – Authentication failed due to invalid or missing API token.
  • "Bad Request" – The query JSON is malformed or required fields are missing.

Resolving these usually involves verifying input values, checking credential configuration, and ensuring the query JSON is correctly formatted.

Links and References

Discussion