Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node operation, Find Many Messages, retrieves multiple message objects from the connected service. It is useful for scenarios where you need to fetch a list of messages with various filtering, sorting, and pagination options. For example, you might use it to display recent chat messages, retrieve notifications, or gather communication logs filtered by specific criteria.
Properties
| Name | Meaning |
|---|---|
| Order By | Sorts the returned messages by specified fields. The format is field_name_1,field_name_2[DIRECTION_2],.... Directions can be: AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: createdAt,usernameDescNullsLast sorts first by creation date ascending, then username descending. Default is id. |
| Filter | Filters the messages returned based on field comparators. Format: field[COMPARATOR]:value. Comparators include eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Supports logical conjunctions (and, or, not). Can filter null values using field[is]:NULL or field[is]:NOT_NULL. Boolean filters also supported. Default excludes messages with id equal to all zeros UUID. |
| Limit | Limits the number of messages returned. Default is 60. |
| Depth | Controls how deeply nested related objects are included in the response: 0 = only primary message data; 1 = primary message plus directly related objects; 2 = primary message, related objects, and their related objects. Default is 1. |
| Starting After | Returns messages starting after a specific cursor value, used for pagination. Cursor values come from startCursor or endCursor in the response's pageInfo. |
| Ending Before | Returns messages 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 message objects matching the query parameters. Each message object includes its fields and, depending on the Depth parameter, may include nested related objects up to two levels deep. Pagination information such as cursors (startCursor, endCursor) and page info is also included to facilitate further paginated requests.
If binary data is present in messages (e.g., attachments), it would be represented accordingly, but this operation primarily returns structured JSON message data.
Dependencies
- Requires connection to the 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.
- Uses standard HTTP headers for JSON content negotiation.
Troubleshooting
- Invalid filter syntax: If the filter string is malformed or uses unsupported comparators, the API may return errors. Ensure filters follow the documented format and use valid comparator keywords.
- Pagination cursors invalid or expired: Using outdated or incorrect cursor values in
starting_afterorending_beforewill cause no results or errors. Always use cursors returned from the previous response. - Authentication errors: Missing or invalid API credentials will result in authorization failures. Verify that the API key/token is correctly configured.
- Limit too high: Setting the limit above the allowed maximum (if any) may cause errors or truncated responses. Use reasonable limits.
- Depth too large: Requesting depth beyond supported levels may lead to incomplete data or errors.
Links and References
- Twenty API Documentation (for detailed API usage and filter syntax)
- n8n Documentation - Creating Nodes
- GraphQL Pagination Concepts (since cursors are used for pagination)