ChatWoot icon

ChatWoot

Interact with ChatWoot API

Actions113

Overview

The "Conversation Filter" operation in the Conversations resource allows users to query and filter conversations from an account based on specific attributes and conditions. This node is useful when you want to retrieve a subset of conversations that meet certain criteria, such as filtering by conversation status or user attributes.

Practical examples include:

  • Fetching all conversations with a "pending" status.
  • Filtering conversations where the browser language is not English.
  • Combining multiple attribute filters using logical operators (AND/OR).

This operation helps automate workflows that depend on targeted conversation data, such as triggering follow-ups only for pending conversations or analyzing conversations from users with specific characteristics.

Properties

Name Meaning
Account Id The numeric ID of the account from which to fetch conversations.
Page The page number for paginated results, allowing navigation through multiple pages of conversations.
Payload A JSON array defining filter conditions. Each object specifies:
- attribute_key: the conversation attribute to filter on (e.g., "status", "browser_language").
- filter_operator: the comparison operator (e.g., "eq" for equals, "not_eq" for not equals).
- values: an array of values to compare against.
- query_operator: logical operator to combine this filter with the next one ("AND", "OR", or null if last).

Example of the Payload property value:

[
  {
    "attribute_key": "browser_language",
    "filter_operator": "not_eq",
    "values": [
      "en"
    ],
    "query_operator": "AND"
  },
  {
    "attribute_key": "status",
    "filter_operator": "eq",
    "values": [
      "pending"
    ],
    "query_operator": null
  }
]

Output

The node outputs JSON data representing the filtered list of conversations retrieved from the specified account. The structure typically includes conversation details matching the filter criteria.

If the API supports pagination, the output may also contain metadata about the current page and total available pages.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the ChatWoot API.
  • The base URL for the ChatWoot instance must be configured in the credentials.
  • The node depends on the ChatWoot API being accessible and the account ID being valid.

Troubleshooting

  • Invalid Account Id: If the account ID is incorrect or does not exist, the API will likely return an error or empty results. Verify the account ID before running the node.
  • Malformed Payload JSON: The payload must be valid JSON. Errors parsing the JSON will cause the request to fail. Use proper JSON formatting.
  • API Authentication Errors: Ensure the API key credential is correctly set up and has sufficient permissions.
  • Pagination Issues: If requesting pages beyond the available range, the API might return empty results or errors. Adjust the "Page" property accordingly.
  • Filter Logic Errors: Incorrect use of filter operators or attribute keys may result in no matches or API errors. Refer to ChatWoot API documentation for valid filter parameters.

Links and References

Discussion