TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation "Find Many Message Threads" retrieves multiple message thread objects from the Twenty API. It is useful for scenarios where you want to list, filter, and paginate through message threads in bulk rather than fetching them one by one. For example, you might use this node to display recent conversations, analyze message thread metadata, or synchronize message threads with another system.

Properties

Name Meaning
Order By Sorts the returned message threads by specified fields. Format: field_name_1,field_name_2[DIRECTION_2],.... Directions can be AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: createdAt,updatedAtDescNullsLast sorts by creation date ascending then update date descending.
Filter Filters the message threads returned based on field comparators and values. Supports complex expressions using conjunctions (and, or, not). Comparators include eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Can filter nulls with is:NULL or is:NOT_NULL. Example: status[eq]:open,priority[gte]:3 filters open threads with priority ≥ 3.
Limit Limits the number of message threads returned in one response. Default is 60.
Depth Controls how much nested related data is included:
- 0: Only primary message thread info
- 1: Primary object plus directly related objects
- 2: Primary object, its related objects, and their related objects
Starting After Returns message threads starting after a specific cursor value, used for pagination. Cursor values are found in the response's pageInfo under startCursor or endCursor.
Ending Before Returns message threads ending before a specific cursor value, also used for pagination.

Output

The output JSON contains an array of message thread objects matching the query parameters. Each object includes fields describing the message thread and may include nested related objects depending on the Depth parameter. The response also includes pagination information such as cursors (startCursor, endCursor) inside a pageInfo object to facilitate paginated requests.

If binary data were involved (e.g., attachments), it would be indicated here, but this operation focuses on JSON data representing message threads.

Dependencies

  • Requires an API key credential for authenticating with the Twenty API.
  • The node uses the base URL configured in the credentials.
  • No additional external dependencies beyond the Twenty API and n8n core modules.

Troubleshooting

  • Common issues:
    • Invalid filter syntax can cause errors; ensure filters follow the documented format and comparators.
    • Pagination cursors (starting_after, ending_before) must be valid and obtained from previous responses.
    • Exceeding rate limits or invalid API keys will result in authentication or quota errors.
  • Error messages:
    • "Invalid filter expression": Check filter formatting and comparator usage.
    • "Unauthorized" or "Authentication failed": Verify that the API key credential is correctly set up.
    • "Cursor not found": Ensure the cursor used in pagination exists in the current dataset.

Links and References

Discussion