TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find Many View Filter Groups, retrieves multiple "View Filter Group" objects from an external API. It supports advanced querying capabilities such as filtering, sorting, pagination, and controlling the depth of nested related objects included in the response.

Typical use cases include:

  • Fetching a list of filter groups to display in a dashboard or UI.
  • Retrieving filtered subsets of view filter groups based on specific criteria (e.g., by ID, name, or other fields).
  • Paginating through large sets of filter groups efficiently.
  • Controlling the amount of related data returned to optimize performance or data usage.

For example, you might use this node to get all active filter groups sorted by creation date, limited to 50 results per request, including their directly related objects.

Properties

Name Meaning
Order By Sorts the returned objects. Accepts a string with comma-separated field names optionally followed by a direction. Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: "createdAt,updatedAtDescNullsLast" sorts by createdAt ascending and updatedAt descending with nulls last.
Filter Filters the returned objects using a query string with field comparators. Supports comparators like eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Complex filters can be built using conjunctions or, and, not. Use field[is]:NULL or field[is]:NOT_NULL for null checks, and boolean values with field[eq]:true/false. Example: id[neq]:"00000000-0000-0000-0000-000000000000".
Limit Limits the number of objects returned in one response. Default is 60.
Depth Controls how many levels of nested related objects are included in the response:
- 0: Only primary object info.
- 1: Primary object plus directly related objects.
- 2: Primary object, its related objects, and those related objects' related objects.
Starting After Returns objects starting after a specific cursor value. Useful for pagination. Cursor values are found in the response's pageInfo under startCursor and endCursor.
Ending Before Returns objects ending before a specific cursor value. Also used for pagination with cursors found in pageInfo.

Output

The node outputs JSON data containing the retrieved "View Filter Group" objects according to the specified filters, sorting, and pagination parameters. The structure typically includes:

  • An array of view filter group objects with their fields.
  • Nested related objects depending on the depth parameter.
  • Pagination information such as cursors (startCursor, endCursor) inside a pageInfo object to facilitate further paginated requests.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to access the external Twenty API.
  • The base URL for API requests is dynamically set from credentials.
  • Uses standard HTTP headers for JSON content negotiation.

Troubleshooting

  • Empty Results: If no objects are returned, verify that your filter syntax is correct and matches existing data. Check if the default filter excluding the zero UUID is appropriate for your use case.
  • Invalid Filter Syntax: Errors may occur if the filter string does not follow the expected format or uses unsupported comparators. Review the filter property description carefully.
  • Pagination Issues: Using invalid or expired cursor values in starting_after or ending_before may result in errors or empty responses. Always use cursors provided in the previous response's pageInfo.
  • Depth Parameter Misuse: Setting depth too high may cause performance issues or large payloads. Adjust according to your needs.
  • Authentication Failures: Ensure the API key or authentication token is correctly configured in n8n credentials.

Links and References

Discussion