TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node interacts with the "View Filters" resource of the Twenty API, specifically supporting the "Find Many View Filters" operation. It allows users to query and retrieve multiple view filter objects from the API with flexible sorting, filtering, pagination, and depth control.

Typical use cases include:

  • Fetching a list of saved filters for views in an application.
  • Retrieving filtered subsets of view filters based on complex criteria.
  • Paginating through large sets of view filters.
  • Controlling the amount of related nested data returned for each view filter.

For example, a user might want to get all view filters sorted by creation date descending, only those that are active (filtering by a boolean field), limiting results to 50 per request, and including related objects one level deep.

Properties

Name Meaning
Order By Sorts the returned view filters. Accepts a comma-separated list of fields with optional directions. Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: createdAt,updatedAtDescNullsLast
Filter Filters the returned view filters using field comparators and conjunctions. Supports comparators like eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Complex filters can be built using or, and, not. Null values can be filtered with is:NULL or is:NOT_NULL. Boolean filters use eq:true or eq:false. Example: status[eq]:active,and(createdBy[eq]:user1)
Limit Limits the number of view filters returned in the response. Default is 60.
Depth Controls how many levels of nested related objects are included in the response. Options: 0 (only primary object), 1 (primary + directly related objects), 2 (primary + related + related's related). Default is 1.
Starting After Returns objects starting after a specific cursor value. Useful for pagination. Cursor values come from startCursor or endCursor in the response's pageInfo.
Ending Before Returns objects ending before a specific cursor value. Also used for pagination. Cursor values come from startCursor or endCursor in the response's pageInfo.

Output

The node outputs JSON data representing a collection of view filter objects retrieved from the API. The structure typically includes:

  • An array of view filter objects, each containing fields as defined by the API schema.
  • Pagination information such as cursors (startCursor, endCursor) and page info to support further paginated requests.
  • Nested related objects depending on the depth parameter.

If the API supports binary data within view filters (not indicated here), it would be included accordingly, but this node primarily deals with JSON data.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • The base URL for the API is configured via credentials.
  • No additional external dependencies beyond the Twenty API and its authentication.

Troubleshooting

  • Invalid filter syntax: If the filter string is malformed or uses unsupported comparators, the API may return errors. Ensure filters follow the documented syntax and supported operators.
  • Pagination cursors invalid or expired: Using incorrect or outdated cursor values in starting_after or ending_before will cause errors or empty results. Always use cursors returned from previous responses.
  • Exceeded limit: Setting the limit too high may result in API rate limits or timeouts. Use reasonable limits.
  • Authentication errors: Missing or invalid API credentials will prevent successful requests.
  • Depth too high: Requesting a depth greater than supported may cause incomplete data or errors.

Links and References

Discussion