Actions113
- Accounts Actions
- Account Users Actions
- Agent Bots Actions
- Users Actions
- Inbox API Actions
- Contacts API Actions
- Conversations API Actions
- Messages API Actions
- CSAT Survey Page Actions
- Account Agent Bots Actions
- Agents Actions
- Canned Responses Actions
- Canned Response Actions
- Custom Attributes Actions
- Contacts Actions
- Contact Actions
- Automation Rule Actions
- Help Center Actions
- Conversations Actions
- Conversation Assignment Actions
- Conversation Labels Actions
- Inboxes Actions
- Messages Actions
- Integrations Actions
- Teams Actions
- Custom Filters Actions
- Webhooks Actions
- Reports Actions
Custom Filters → Create A Custom Filter
AI-generatedOverview
This node operation allows users to create a custom filter within the "Custom Filters" resource of the ChatWoot API. Custom filters help segment or organize data such as conversations, contacts, or reports based on specific criteria defined by the user. This is particularly useful for automating workflows, reporting, or managing large datasets by applying reusable query filters.
For example, a user might create a custom filter to isolate all conversations tagged with a certain label or all contacts from a particular region. Once created, these filters can be applied in other parts of the system to streamline data retrieval and processing.
Properties
| Name | Meaning |
|---|---|
| Account Id | The numeric ID of the account where the custom filter will be created. |
| Filter Type | The category of the custom filter; options are: Conversation, Contact, or Report. |
| Name | The name assigned to the custom filter for identification purposes. |
| Type | A description field that also categorizes the custom filter; options: Conversation, Contact, or Report. (Note: appears similar to Filter Type) |
| Query | A JSON object representing the query criteria that define the custom filter's logic. |
Output
The node outputs JSON data representing the newly created custom filter as returned by the ChatWoot API. This typically includes details such as the filter's ID, name, type, query parameters, and associated account information.
No binary data output is involved in this operation.
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 configuration.
Troubleshooting
- Invalid Account Id: If the provided account ID does not exist or the API key lacks access, the request will fail. Verify the account ID and permissions.
- Malformed Query JSON: The
queryproperty expects valid JSON. Invalid JSON syntax will cause errors. Ensure the JSON is well-formed. - Missing Required Fields: The
account_idis mandatory. Omitting it will result in an error. - API Authentication Errors: If the API key is invalid or expired, authentication will fail. Check and update credentials as needed.
- Conflicting Filter Type and Type Fields: Both
filter_typeandtypeaccept similar values. Inconsistent values may cause unexpected behavior. Use consistent values for both fields.