TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find Many View Sorts, retrieves multiple "View Sort" objects from the connected service. It allows users to query and filter these objects with fine-grained control over sorting order, filtering conditions, pagination, and the depth of related nested objects included in the response.

Typical use cases include:

  • Fetching a list of view sort configurations for display or further processing.
  • Querying view sorts with specific criteria (e.g., excluding default or empty IDs).
  • Paginating through large sets of view sorts using cursors.
  • Controlling how much related data is returned alongside each view sort.

For example, you might use this node to get all view sorts sorted by creation date descending, filtered to exclude disabled entries, and including related user information up to one level deep.

Properties

Name Meaning
Order By Specifies the sorting order of the returned objects. Format: field_name_1,field_name_2[DIRECTION_2],.... Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: id (default).
Filter Filters the returned objects based on field values and comparators. Format: field_1[COMPARATOR]:value_1,field_2[COMPARATOR]:value_2,.... Supports composite fields like field.subField[COMPARATOR]:value. Comparators include: eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Logical conjunctions or, and, not are supported. Default root conjunction is and. Use field[is]:NULL or field[is]:NOT_NULL to filter nulls; boolean filters like field[eq]:true also supported. Default filter excludes objects with ID "00000000-0000-0000-0000-000000000000".
Limit Limits the number of objects returned. Default is 60.
Depth Controls the level of nested related objects included in the response:
- 0: Only primary object info.
- 1: Primary object plus directly related objects.
- 2: Primary object, directly related objects, and their related objects. Default is 1.
Starting After Returns objects starting after a specific cursor value. Useful for pagination. Cursor values can be found in startCursor and endCursor fields in the response's pageInfo.
Ending Before Returns objects ending before a specific cursor value. Also used for pagination. Cursor values are found in startCursor and endCursor in the response's pageInfo.

Output

The node outputs JSON data containing an array of "View Sort" objects matching the query parameters. The structure includes:

  • The main data array with the requested view sort objects.
  • Pagination information (pageInfo) including cursors (startCursor, endCursor) to support cursor-based pagination.
  • Nested related objects according to the specified depth parameter.

No binary data output is indicated for this operation.

Dependencies

  • Requires connection to the Twenty API service.
  • Needs an API authentication token credential configured in n8n to authorize requests.
  • The base URL for the API is set dynamically from credentials.
  • The node sends HTTP GET requests with query parameters corresponding to the input properties.

Troubleshooting

  • Empty results: Check your filter syntax and ensure that the filter does not exclude all records unintentionally (e.g., filtering out all IDs).
  • Invalid filter or order_by format: Ensure the filter string and order_by string follow the documented formats exactly, including correct comparator names and directions.
  • Pagination issues: When using starting_after or ending_before, verify that the cursor values come from previous responses' pageInfo.
  • Authentication errors: Confirm that the API key or token credential is correctly set up and has sufficient permissions.
  • Depth too high: Requesting a depth greater than 2 may not be supported and could cause errors or incomplete data.

Links and References

Discussion