WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node integrates with the WSAPI WhatsApp API to send voice messages. It allows users to send a voice note to a specific WhatsApp contact or group by providing the recipient's ID and a publicly accessible URL of the voice media file. This is useful for automating voice message delivery in customer support, marketing campaigns, or personal communication workflows.

Practical examples:

  • Automatically sending a voice greeting to new customers.
  • Broadcasting voice announcements to a WhatsApp group.
  • Delivering personalized voice reminders or alerts.

Properties

Name Meaning
To The WhatsApp contact ID or group ID to which the voice message will be sent. For contacts, use the phone number 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 voice media file to send. Must be publicly accessible. Supported formats typically include common audio types like MP3 or OGG.
Advanced Options Additional optional settings:
- Mentions: Comma-separated list of phone numbers (without @) to mention in the message.
- Reply To Message ID: ID of a message to reply to.
- Is Forwarded: Boolean indicating if the message is forwarded.
- View Once: Boolean indicating if the media should disappear after being viewed (only applicable for image and video operations, not voice).

Output

The node outputs JSON data representing the result of the send voice message operation. This typically includes metadata about the sent message such as message ID, status, timestamps, and any server response details confirming successful delivery.

If the operation involves binary data (e.g., media files), the node would handle it accordingly, but for sending voice messages, the output focuses on JSON metadata confirming the action.

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; no authentication on the media URL is supported.
  • Proper formatting of the "To" field is essential (phone number with country code + domain suffix).

Troubleshooting

  • Invalid recipient ID: Ensure the "To" property uses the correct format (number@s.whatsapp.net for contacts or groupid@g.us for groups). Missing country codes or incorrect suffixes will cause errors.
  • Media URL inaccessible: The media URL must be publicly reachable. Private URLs or those behind authentication will fail.
  • Unsupported media format: Voice messages require supported audio formats (commonly MP3 or OGG). Using unsupported formats may cause the API to reject the message.
  • API authentication errors: Verify that the API key credential is correctly set up and has necessary permissions.
  • Message sending failures: Check error messages returned by the API for details such as rate limits, invalid parameters, or network issues.

Links and References

Discussion