Actions55
- Session Actions
- Message Actions
- Chat Actions
- Contact Actions
- Group Actions
- Webhook Actions
- Status Actions
Overview
This node integrates with the WAHA API to send WhatsApp messages, specifically supporting sending files in this context. It allows users to send various types of media files (including generic files) to WhatsApp chats or groups by specifying the chat ID and file details. This is useful for automating the distribution of documents, images, videos, or other media directly through WhatsApp.
Practical examples include:
- Sending invoices or contracts as PDF files to clients automatically.
- Distributing promotional materials or brochures as files to customer groups.
- Sharing multimedia content like videos or audio clips in a broadcast.
Properties
| Name | Meaning |
|---|---|
| Session Name | The name of the WhatsApp session to use for sending the message. Defaults to a configured session. |
| Chat ID | The WhatsApp chat identifier where the file will be sent. Format: phone number with @c.us or group ID with @g.us. |
| File URL/Path | URL or base64 string representing the file to send. |
| Caption | Optional caption text to accompany the media file. |
| Additional Fields | Collection of optional fields: - Filename: Custom filename for the media file. - Mimetype: MIME type of the file. - Link Description: Description for link preview (not used here). - Link Title: Title for link preview (not used here). - Contact Name: Name for contact vCard (not used here). - Contact Number: Phone number for contact vCard (not used here). - Reaction: Emoji reaction to send (not used here). - Limit: Limit number of results (not used here). - Download Media: Whether to download media files in messages (not used here). |
Output
The node outputs a JSON object containing the response from the WAHA API after attempting to send the file message. This typically includes status information about the message delivery or any errors returned by the API.
If the operation fails and "Continue On Fail" is enabled, the output will contain an error message describing the failure.
No binary data output is produced by this operation.
Dependencies
- Requires a valid WAHA API credential with an API key and base URL configured in n8n.
- Optionally uses another API credential for an internal validation service (N8N Tools API) which validates subscription and API keys before making requests.
- The node sends HTTP requests to the WAHA API endpoints to perform actions.
- Requires proper WhatsApp session management; the session name must correspond to an active WhatsApp session.
Troubleshooting
- Invalid Subscription or API Key: If the internal validation request returns 401 or 403, it indicates invalid or expired API credentials. Verify and update your API keys.
- Unknown Operation or Resource Errors: These occur if unsupported operations or resources are selected. Ensure you select "Message" as resource and "Send File" as operation.
- Missing Required Parameters: The node requires
chatIdandfileUrlat minimum. Missing these will cause errors. - File Access Issues: If the file URL/path is inaccessible or invalid, the API may fail to send the file. Ensure URLs are publicly accessible or base64 data is correctly formatted.
- Session Not Active: If the specified WhatsApp session is not active or incorrectly named, the API call will fail. Confirm the session name matches an active session.
Links and References
- WAHA API Documentation (general reference for API endpoints)
- WhatsApp Chat ID Format (explains chat ID formats)
- n8n Credential Setup (how to configure API credentials in n8n)