TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation "Find Many Favorites" retrieves multiple favorite objects from the connected service. It is useful for scenarios where you want to list or query a collection of favorites with flexible filtering, sorting, and pagination options. For example, you might use it to display a user's favorite items sorted by creation date, filter favorites by certain criteria, or paginate through large sets of favorites.

Properties

Name Meaning
Order By Sorts the returned favorite objects. You specify fields to sort by, optionally with directions. Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: createdAt,updatedAtDescNullsLast
Filter Filters the favorites returned based on field conditions. 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). You can filter null values and booleans. Example: status[eq]:active,id[neq]:"00000000-0000-0000-0000-000000000000"
Limit Limits the number of favorite objects returned in one response. Default is 60.
Depth Controls how much nested related data to include: 0 = only primary favorite object, 1 = primary plus directly related objects, 2 = primary plus related objects and their related objects.
Starting After Returns favorites starting after a specific cursor value, used for pagination. Cursor values come from startCursor or endCursor in the response's pageInfo.
Ending Before Returns favorites ending before a specific cursor value, also for pagination. Cursor values come from startCursor or endCursor in the response's pageInfo.

Output

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

  • The main data array with favorite objects.
  • Pagination info such as cursors (startCursor, endCursor) to support cursor-based pagination.
  • Nested related objects depending on the depth parameter.

No binary data output is indicated.

Dependencies

  • Requires an API key credential to authenticate requests to the external Twenty API service.
  • The base URL for the API is configured via credentials.
  • The node uses standard HTTP headers for JSON content.

Troubleshooting

  • Empty results: Check your filter syntax and ensure that the filter values match existing data. Also verify that the limit and pagination cursors are set correctly.
  • Invalid filter or order_by format: Ensure the filter string follows the documented syntax with correct comparators and conjunctions. Similarly, order_by must follow the specified pattern with valid directions.
  • Authentication errors: Verify that the API key credential is correctly configured and has necessary permissions.
  • Pagination issues: When using starting_after or ending_before, make sure to use valid cursor values obtained from previous responses.
  • Depth too high: Requesting a depth greater than supported may result in incomplete or missing nested data.

Links and References

  • Twenty API Documentation (hypothetical link)
  • n8n documentation on pagination
  • Explanation of filter syntax and comparators typically found in REST APIs supporting advanced querying

Discussion