Actions50
- Account Actions
- Call Actions
- Chat Actions
- Contact Actions
- Group Actions
- Instance Actions
- Media Actions
- Message Actions
- Session Actions
- User Actions
Overview
This node integrates with the WSAPI WhatsApp API to send various types of WhatsApp messages. Specifically, the Send Audio operation under the Message resource allows users to send audio files to individual contacts or groups on WhatsApp by providing a publicly accessible media URL.
Common scenarios where this node is beneficial include:
- Automating customer support by sending voice messages.
- Broadcasting audio announcements or alerts to groups.
- Sharing audio content such as podcasts or music clips in workflows.
Example: Automatically send a welcome voice message to new customers when they join a WhatsApp group.
Properties
| Name | Meaning |
|---|---|
| To | The recipient's WhatsApp ID. For individual contacts, use the phone number with country code (no plus sign) followed by @s.whatsapp.net (e.g., 1234567890@s.whatsapp.net). For groups, use the group ID followed by @g.us. |
| Media URL | The direct HTTP or HTTPS URL of the audio file to send. Must be publicly accessible. Supported formats typically include MP3 and other common audio formats. |
| Mentions | (Advanced Option) Comma-separated list of phone numbers (without @) to mention/tag in the message. |
| Reply To Message ID | (Advanced Option) The ID of an existing message to which this audio message will be sent as a reply. |
| Is Forwarded | (Advanced Option) Boolean flag indicating if the message should be marked as forwarded. |
| View Once | (Advanced Option) Boolean flag indicating if the media should disappear after being viewed once. Only applicable for image and video messages, so not relevant for audio. |
Output
The node outputs JSON data representing the result of the send operation. This typically includes metadata about the sent message such as message ID, status, timestamps, and recipient information.
If the operation supports binary data output (not typical for sending audio), it would represent the raw media or related binary content, but for sending audio, the output is primarily JSON confirming the message was sent.
Dependencies
- Requires an active connection to the WSAPI WhatsApp API service.
- Needs an API key credential configured in n8n to authenticate requests.
- The media URL must be publicly accessible over HTTP or HTTPS; private or protected URLs will not work.
- Proper formatting of WhatsApp IDs (
tofield) is essential for successful delivery.
Troubleshooting
- Invalid Recipient ID: If the
Toproperty is incorrectly formatted (missing country code, wrong suffix), the message will fail. Ensure the format matchesphone@s.whatsapp.netfor contacts orgroup@g.usfor groups. - Media URL Not Accessible: If the media URL is not publicly reachable or returns an error, the audio will not send. Verify the URL is correct and accessible without authentication.
- Unsupported Media Format: Sending unsupported audio formats may cause errors. Use common formats like MP3.
- API Authentication Errors: Missing or invalid API credentials will prevent the node from connecting to WSAPI. Check that the API key is correctly set up in n8n.
- Forwarded Flag Misuse: Setting "Is Forwarded" incorrectly might affect message display on the recipient side.
- Reply To Message ID Invalid: If replying to a non-existent or inaccessible message ID, the operation may fail.
Links and References
- WSAPI WhatsApp API Documentation (general reference for API capabilities)
- WhatsApp Business API Media Messages (for understanding media message requirements)
- n8n Documentation - Creating Custom Nodes