TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation, Find Many Message Folders, retrieves multiple message folder objects from an external service. It is useful when you want to list or search through message folders with various filtering, sorting, and pagination options. Typical use cases include displaying a user's message folders in a UI, syncing folders for backup, or processing folders based on specific criteria.

For example, you could use this node to:

  • Fetch all message folders sorted by creation date.
  • Retrieve only folders that match certain filter conditions (e.g., folders not having a default ID).
  • Paginate through large sets of folders using cursors.
  • Control the depth of related nested data returned for each folder.

Properties

Name Meaning
Order By Sorts the returned message folders. Accepts a comma-separated list of field names optionally followed by a direction modifier. Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: createdAt,updatedAtDescNullsLast.
Filter Filters the message folders returned. Supports complex expressions combining fields, comparators, and conjunctions. Comparators include eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. You can filter null values and boolean values as well. Example: id[neq]:"00000000-0000-0000-0000-000000000000".
Limit Limits the number of message folders returned in one response. Default is 60. Useful for pagination or controlling response size.
Depth Controls how much nested related data is included with each message folder. Options are: 0 (only primary object), 1 (primary plus directly related objects), 2 (primary, directly related, and their related objects). This helps manage response payload size and detail level.
Starting After Returns message folders starting after a specific cursor value. Used for cursor-based pagination. Cursor values come from startCursor or endCursor in the response's pageInfo.
Ending Before Returns message folders ending before a specific cursor value. Also used for cursor-based pagination.

Output

The node outputs JSON data representing a collection of message folder objects matching the query parameters. The structure typically includes:

  • An array of message folder objects, each containing fields such as IDs, names, timestamps, and any related nested objects depending on the depth parameter.
  • Pagination information including cursors (startCursor, endCursor) and page info to facilitate further paginated requests.

If the API supports binary data for message folders (e.g., attachments or icons), it would be included in a binary output field, but this operation primarily returns JSON data about folders.

Dependencies

  • Requires connection to the external Twenty API service.
  • Needs an API authentication token or API key credential configured in n8n to authorize requests.
  • The base URL for the API is set dynamically from credentials.
  • No additional external dependencies beyond the API and its authentication.

Troubleshooting

  • Empty results: Check your filter expression syntax and ensure it matches existing data. Also verify pagination cursors if using starting_after or ending_before.
  • Invalid filter or order_by syntax: The API expects specific comparator keywords and sort directions. Refer to the property descriptions to correct formatting.
  • Authentication errors: Ensure the API key or token credential is valid and has sufficient permissions.
  • Rate limiting or timeouts: If querying large datasets, consider reducing the limit or adding delays between requests.
  • Depth too high causing large responses: Use lower depth values to reduce payload size and improve performance.

Links and References

Discussion