Actions26
Overview
This node operation allows you to list received messages for a specified project across multiple messaging platforms such as Telegram, Discord, and WhatsApp (via WhatsApp Evo). It is useful for aggregating and filtering incoming messages based on various criteria like platform type, chat or channel ID, user ID, date ranges, and pagination controls.
Typical use cases include:
- Monitoring and analyzing messages received in a project’s communication channels.
- Filtering messages by platform or user to generate reports or trigger workflows.
- Retrieving recent messages within a specific timeframe for auditing or processing.
For example, you could use this node to fetch the last 50 messages from a Telegram chat in your project or to get all Discord messages sent by a particular user after a certain date.
Properties
| Name | Meaning |
|---|---|
| Filter by platform | Select the messaging platform to filter messages from. Options: telegram, discord, whatsapp-evo |
| Filter by chat/channel ID | Specify the chat or channel identifier to filter messages belonging to that conversation. |
| Filter by user ID | Filter messages sent by a specific user ID. |
| Filter messages after this date | Only include messages received after this ISO 8601 formatted date. |
| Filter messages before this date | Only include messages received before this ISO 8601 formatted date. |
| Number of messages to return | Limit the number of messages returned (between 1 and 100). Default is 50. |
| Number of messages to skip | Skip a specified number of messages (useful for pagination). |
| Sort order | Order messages by date ascending (asc) or descending (desc). Default is desc. |
| Project Slug | Identifier of the project to operate on. This is required to specify which project’s messages to list. |
Output
The output contains a JSON array of message objects representing the messages retrieved according to the applied filters. Each message object typically includes details such as message content, sender information, platform, timestamps, and related metadata.
If the node supports binary data output (not explicitly shown here), it would represent attachments or media associated with messages, but this operation primarily returns JSON data about messages.
Dependencies
- Requires an API key credential configured in n8n to authenticate requests against the GateKit messaging gateway API.
- The node sends HTTP GET requests to the endpoint
/api/v1/projects/{projectSlug}/messageswith query parameters based on the input properties. - The base URL for the API is taken from the configured credentials.
Troubleshooting
- Empty results: Ensure the
projectSlugis correct and that there are messages matching the filter criteria. Adjust date filters or remove some filters to broaden the search. - Invalid date format errors: Dates must be in ISO 8601 format (e.g.,
2023-01-01T00:00:00Z). Incorrect formats will cause request failures. - API authentication errors: Verify that the API key credential is valid and has permissions to access the specified project.
- Limit and offset misuse: Setting a very high limit or incorrect offset may result in no data or partial data. Keep limits between 1 and 100.
- Platform filter issues: If filtering by platform yields no results, confirm that messages exist for that platform in the project.
Links and References
- GateKit API Documentation (hypothetical link)
- ISO 8601 Date Format
- n8n documentation on HTTP Request Node (for understanding underlying HTTP calls)