WaAPI icon

WaAPI

Interact with WaAPI API

Actions85

Overview

This node allows sending media messages to WhatsApp chats via the WaAPI service. It supports sending images, audio, documents, or other media either by URL or as Base64 encoded content. Users can specify various options such as captions, file names, and message reply references.

Common scenarios include:

  • Sending promotional images or product catalogs to customers.
  • Sharing voice notes or audio clips in conversations.
  • Distributing documents or PDFs directly through WhatsApp.
  • Replying to specific messages with media attachments.

Practical example: A marketing automation workflow sends a promotional flyer image with a caption to a customer group chat, optionally replying to a previous message for context.

Properties

Name Meaning
Id Instance ID (number) identifying the WaAPI instance to use.
Chat Id Target chat identifier in format <countrycode><usernumber>@c.us for individuals or @g.us for groups.
Media Url URL of the media file to send.
Media Base 64 Base64 encoded string of the media content to send.
Media Caption Optional text caption accompanying the media.
Media Name Optional filename for the media; required if sending Base64 content.
Reply To Message Id Optional message ID to which this media message replies, formatted as <fromMe>_<chatId>_<messageHash>.
Preview Link Boolean flag indicating whether to show link previews for URLs in the message.
As Sticker Boolean flag to send the media as a sticker instead of a regular media message.
As Voice Boolean flag to send audio media as a voice message.
As Document Boolean flag to send the media as a document attachment rather than inline media.

Output

The node outputs JSON data representing the response from the WaAPI service after sending the media message. This typically includes message metadata such as message IDs, status, timestamps, and any error information if applicable.

If binary data is involved (e.g., media files), it is handled internally by the API and not outputted directly by the node.

Dependencies

  • Requires an active WaAPI API key credential configured in n8n.
  • The node communicates with the WaAPI REST API endpoint at https://waapi.app/api/v1.
  • Proper network connectivity to the WaAPI service is necessary.

Troubleshooting

  • Invalid Chat Id: Ensure the chat ID follows the correct format (<countrycode><number>@c.us for individual chats or @g.us for groups).
  • Missing Media Content: Either Media Url or Media Base 64 must be provided. If using Base64, Media Name is required.
  • Authentication Errors: Verify that the API key credential is correctly set up and has sufficient permissions.
  • Reply To Message Id Format: Must follow the exact format <fromMe>_<chatId>_<messageHash>; otherwise, the reply will fail.
  • Network Issues: Check internet connectivity and firewall settings that might block access to the WaAPI endpoint.

Common error messages usually relate to invalid parameters or authentication failures and can be resolved by reviewing input values and credentials.

Links and References

Discussion