Actions148
- Send messages Actions
- Outbound Messages Actions
- WhatsApp Numbers Actions
- Groups Actions
- Channels Actions
- Chats Actions
- Chat Contacts Actions
- Chat Messages Actions
- Chat Files Actions
- Team Actions
- Labels Actions
- Departments Actions
- Files Actions
- Quick replies Actions
- Queue Actions
- WhatsApp session Actions
- WhatsApp profile Actions
- Business catalog Actions
- Campaigns Actions
- Meeting Links Actions
- User Status Actions
- Webhooks Actions
- Other Actions
Overview
This node interacts with the Wassenger WhatsApp API to retrieve chat messages from a specified WhatsApp number. It is particularly useful for scenarios where you need to programmatically access message history, filter messages by various criteria (such as inbound/outbound direction, delivery status, message type, date ranges), or synchronize messages from a WhatsApp session.
Practical examples include:
- Fetching recent inbound messages for customer support analysis.
- Retrieving all images sent in a group chat within a specific date range.
- Synchronizing messages when no local cache is available.
- Filtering messages by delivery status to monitor message delivery performance.
Properties
| Name | Meaning |
|---|---|
| WhatsApp Number | The ID of the WhatsApp number (device) from which to fetch messages. |
| Filters | A collection of optional filters to narrow down the messages retrieved: |
| - Flow | Filter messages by direction: "Inbound" (received) or "Outbound" (sent). |
| - Delivery Status | Filter messages by delivery acknowledgment status: Pending, Sent, Delivered, Read, Failed. |
| - WhatsApp IDs | Filter messages by one or more WhatsApp message IDs (WID). |
| - Search | Search messages by text content, contact name, or media filename. |
| - Chat ID | Filter messages by chat WhatsApp ID (can be user, group, or channel). |
| - From | Return messages sent from a given phone number or WhatsApp WID. |
| - To | Return messages received to a given phone number or WhatsApp WID. |
| - Chat Type | Filter messages by chat type: Chat, Group, Channel, Community. |
| - Reference | Filter messages by exact match on the reference field. |
| - Message Type | Filter messages by type: Text, Image, Audio, Voice, Video, Document, Contact, Location, System. |
| - Sync Messages | Boolean flag indicating whether to sync messages from the WhatsApp session if no messages are locally available. |
| - Begin From Message ID | Return newest messages starting from the given message ID. |
| - End At Message ID | Return oldest messages starting from the given message ID. |
| - Created After | Return messages created after the specified date/time. |
| - Created Before | Return messages created before the specified date/time. |
| - Include | Include nested related documents per message: Contact, Chat, Media. |
| - Sort | Sort messages by date: Recent First or Oldest First. |
| - Results Page Size | Number of results per page (pagination size). |
| - Page Number | Page number to return (starting from 0). |
| - Skip Messages | Number of messages to skip (only applicable if syncing messages). |
Output
The node outputs an array of JSON objects representing the retrieved chat messages. Each message object contains details such as message content, sender/receiver info, timestamps, message type, and optionally nested related documents like contact info, chat metadata, or media details depending on the "Include" filter.
If binary data (e.g., media files) is included, it will be represented accordingly but the main output focuses on structured JSON describing each message and its attributes.
Dependencies
- Requires an active connection to the Wassenger WhatsApp API.
- Needs an API key credential configured in n8n for authentication.
- The WhatsApp number (device) must be registered and accessible via the Wassenger service.
- Optional dependencies include availability of chat, contact, and media data on the Wassenger backend for enriched message details.
Troubleshooting
- No messages returned: Check that the WhatsApp number is correct and has messages matching the filter criteria. If using sync, ensure the WhatsApp session is active.
- Authentication errors: Verify that the API key credential is correctly set up and has necessary permissions.
- Invalid filter values: Ensure that filter options like message types, chat types, and statuses use valid values as defined.
- Pagination issues: When paginating, confirm that page numbers and sizes are within valid ranges.
- Timeouts or slow responses: Large queries or extensive synchronization may take time; consider narrowing filters or increasing timeout settings.