WSAPI Message

Send and manage WhatsApp messages via WSAPI

Overview

This node enables sending WhatsApp voice messages via a WSAPI (WhatsApp API) service. It supports sending voice messages either by providing a direct URL to the audio file or by supplying Base64-encoded audio data. The node is useful in scenarios where automated systems need to send voice notes, alerts, or notifications through WhatsApp, such as customer support callbacks, voice reminders, or interactive voice responses.

For example, you can use this node to send a voice message stored on a public server by specifying its URL, or send dynamically generated voice content encoded in Base64 format directly.

Properties

Name Meaning
Recipient WhatsApp ID of the recipient (phone number with @s.whatsapp.net for contacts, or group ID with @g.us for groups).
Voice Source Source of the voice message. Options: URL (provide a link to the voice file), Base64 (provide Base64 encoded voice data).
Voice URL URL of the voice message to send. Required if Voice Source is URL.
Voice Base64 Base64 encoded voice data. Required if Voice Source is Base64.
Advanced Options Additional optional settings:
- Mentions: Comma-separated list of WhatsApp IDs to mention in the message.
- Reply To Message ID: ID of the message this is replying to.
- Is Forwarded: Mark the message as forwarded (boolean).
- View Once: Send as disappearing media (view once) (boolean).

Output

The node outputs the JSON response returned by the WSAPI service after sending the voice message. This typically includes details about the sent message such as message ID, status, timestamps, and any metadata provided by the API.

If the operation fails, the output will contain an error message describing the issue.

The node does not output binary data; it only returns JSON metadata about the sent message.

Dependencies

  • Requires connection to a WSAPI WhatsApp messaging service.
  • Needs an API key credential and instance identifier configured in n8n credentials for authentication.
  • The WSAPI base URL and authentication headers are used internally to make HTTP requests.

Troubleshooting

  • Invalid Recipient ID: Ensure the recipient WhatsApp ID is correctly formatted with @s.whatsapp.net for individual contacts or @g.us for groups.
  • Missing or Incorrect Voice Data: If using URL source, verify the URL is accessible and points to a valid audio file. For Base64 source, ensure the data is properly encoded and complete.
  • Authentication Errors: Confirm that the API key and instance ID credentials are correctly set up and have sufficient permissions.
  • Network Issues: Check connectivity to the WSAPI endpoint and that the URL is reachable from the n8n environment.
  • View Once Option: When enabled, the voice message will be sent as disappearing media; recipients can only view it once.

Common error messages usually come from the WSAPI service and indicate issues like invalid parameters, unauthorized access, or resource not found. Review the error message details and verify input properties accordingly.

Links and References

Discussion