TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find Many Favorite Folders, retrieves multiple favorite folder objects from the connected service. It is useful when you want to list or query a collection of favorite folders with various filtering, sorting, and pagination options.

Typical use cases include:

  • Displaying a user's favorite folders in an application.
  • Synchronizing favorite folder data between systems.
  • Filtering favorite folders based on specific criteria such as ID or other attributes.
  • Paginating through large sets of favorite folders efficiently.

For example, you might use this node to fetch all favorite folders sorted by creation date, filtered to exclude a default or empty folder, and limit the results to 60 entries per request.

Properties

Name Meaning
Order By Sorts the returned favorite folders. The value should be a comma-separated list of field names optionally followed by a direction modifier. Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. If no direction is specified, AscNullsFirst is used by default. Example: createdAt, nameDescNullsLast. Default is id.
Filter Filters the favorite folders returned. Supports complex expressions combining fields, comparators, and conjunctions (and, or, not). Comparators include eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. You can filter on nested fields using dot notation. For example, id[neq]:"00000000-0000-0000-0000-000000000000" excludes a folder with that specific ID.
Limit Limits the number of favorite folders returned in one response. Default is 60.
Depth Controls how much related nested data is included in the response:
- 0: Only primary favorite folder data.
- 1: Primary folder plus directly related objects.
- 2: Primary folder, its related objects, and their related objects.
Default is 1.
Starting After Returns favorite folders starting after a specific cursor value. Useful for paginating forward through results. Cursor values are found in the startCursor and endCursor fields of the pageInfo object in the response.
Ending Before Returns favorite folders ending before a specific cursor value. Useful for paginating backward through results. Cursor values are found in the startCursor and endCursor fields of the pageInfo object in the response.

Output

The node outputs JSON data containing the retrieved favorite folders. The structure typically includes:

  • An array of favorite folder objects matching the query parameters.
  • Pagination information (pageInfo) including cursors (startCursor, endCursor) to facilitate fetching subsequent or previous pages.
  • Each favorite folder object may contain nested related objects depending on the depth parameter.

If binary data were involved (not indicated here), it would represent file contents or attachments related to favorite folders, but this operation focuses on JSON data only.

Dependencies

  • Requires an API key credential or similar authentication token configured in n8n to access the external Twenty API service.
  • The node uses HTTP requests with query parameters corresponding to the input properties.
  • No additional external dependencies beyond the configured API credentials and network connectivity.

Troubleshooting

  • Empty Results: If no favorite folders are returned, verify your filter criteria and ensure the account has favorite folders matching those filters.
  • Invalid Filter Syntax: Errors may occur if the filter string is malformed. Ensure correct use of comparators, conjunctions, and proper quoting of values.
  • Pagination Issues: Using invalid or expired cursor values in starting_after or ending_before may result in errors or empty responses. Use cursors directly from the pageInfo in previous responses.
  • Authentication Errors: Ensure the API key or authentication token is valid and has sufficient permissions.
  • Rate Limiting: If many requests are made rapidly, the API may throttle requests. Implement retry logic or reduce request frequency.

Links and References

Discussion