Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
This node integrates with the WAHA API to manage WhatsApp chats and retrieve messages from them. Specifically, the "Get Messages" operation under the "Chat" resource fetches messages from a specified WhatsApp chat. This is useful for workflows that need to process or analyze incoming or historical chat messages, such as customer support automation, message archiving, or triggering actions based on received content.
For example, you can use this node to:
- Retrieve the last 100 messages from a customer support chat to analyze conversation history.
- Download media files sent in a group chat for further processing.
- Monitor specific chats for keywords or commands to trigger automated responses.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use (defaults to the credential's default session). |
| Chat ID | The unique identifier of the WhatsApp chat (phone number with @c.us or group ID with @g.us). Required. |
| Additional Fields | Optional extra parameters: - Limit: Number of messages to retrieve (default 100). - Download Media: Whether to download media files included in messages (boolean). - Other fields like Filename, Mimetype, Link Description/Title, Contact Name/Number, Reaction are available but not used in this operation. |
Output
The output is an array of JSON objects representing the messages retrieved from the specified chat. Each item corresponds to one message and includes all relevant message data returned by the WAHA API, such as text content, sender info, timestamps, and potentially media metadata if media downloading is enabled.
If media files are downloaded (downloadMedia set to true), the node will include the media content in the output, allowing subsequent nodes to access or save these files.
Dependencies
- Requires a valid WAHA API credential with an API key and base URL configured in n8n.
- Optionally uses an additional API key credential for validating subscription via the N8N Tools API.
- The node sends HTTP requests to the WAHA API endpoints to perform operations.
- The WhatsApp session must be active and connected for the chat and message retrieval to work.
Troubleshooting
- Invalid Credentials or Subscription Errors: If the node throws errors related to invalid API keys or subscription issues, verify that both the WAHA API and optional N8N Tools API credentials are correctly set up and active.
- Chat ID Not Found: Ensure the provided Chat ID is correct and formatted properly (e.g.,
5511999999999@c.usfor individual chats orgroupid@g.usfor groups). - Session Issues: If messages cannot be retrieved, check that the WhatsApp session named in "Session Name" is active and logged in.
- API Rate Limits or Network Errors: Temporary network issues or API rate limits may cause failures; retrying or checking API usage quotas might help.
- Large Message Limits: Requesting very large numbers of messages may slow down execution or cause timeouts; consider limiting the number of messages retrieved.
Links and References
- WAHA API Documentation (replace with actual URL)
- WhatsApp Chat IDs Format
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)
Note: The above summary is based solely on static analysis of the provided source code and property definitions without runtime execution.