WSAPI icon

WSAPI

Interact with WSAPI WhatsApp API

Overview

This node enables sending various types of WhatsApp messages through the WSAPI WhatsApp API, specifically focusing here on the Send Video operation under the Message resource. It allows users to send video files to individual contacts or groups on WhatsApp by providing a publicly accessible media URL and optional metadata such as captions and advanced options.

Common scenarios where this node is beneficial include:

  • Broadcasting promotional or informational videos to customers.
  • Sharing event highlights or tutorials in group chats.
  • Automating video message delivery in customer support workflows.

Practical example: A marketing automation workflow sends a product demo video with a caption to a list of customers' WhatsApp numbers.

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 video file to send. Must be publicly accessible. Supported format for videos is MP4.
Caption Optional text caption to accompany the video message. Supports emojis and formatting.
Advanced Options Additional optional settings:
- Mentions: Comma-separated phone numbers (without @) to mention in the message.
- Reply To Message ID: ID of a message to reply to.
- Is Forwarded: Marks the message as forwarded.
- View Once: If true, the video will disappear after being viewed once.

Output

The node outputs an array of JSON objects representing the result of the send video operation for each input item. Each output JSON typically contains metadata about the sent message, such as message ID, status, timestamps, or error information if the send failed.

If binary data were involved (e.g., uploading media), it would be included in the binary output field, but for sending video via URL, only JSON output is expected.

Dependencies

  • Requires an active connection to the WSAPI WhatsApp API service.
  • Needs an API key credential configured in n8n for authentication.
  • The media URL must be publicly accessible over HTTP or HTTPS.
  • The node depends on the WSAPI base URL provided in credentials.

Troubleshooting

  • Invalid Recipient ID: Ensure the "To" property uses the correct format (phone@s.whatsapp.net for contacts, group@g.us for groups). Missing country codes or incorrect suffixes cause errors.
  • Media URL Not Accessible: The video URL must be reachable without authentication. Private URLs or expired links will cause failures.
  • Unsupported Video Format: Only MP4 videos are supported. Other formats may lead to rejection by the API.
  • Permission Errors: Verify that the API key has permissions to send media messages.
  • Message Reply Failures: If specifying a "Reply To Message ID", ensure the ID exists and belongs to the same chat.
  • View Once Option: Using "View Once" incorrectly or with unsupported clients might cause unexpected behavior.

Common error messages usually indicate invalid parameters or network issues; checking the above points resolves most problems.

Links and References

Discussion