Overview
This node allows sending various types of messages through the Wuzapi WhatsApp API. It supports text, images, audio, video, documents, stickers, locations, contacts, template messages with buttons, button messages, list messages, and polls (for groups). The node is useful for automating WhatsApp communications in workflows, such as sending notifications, multimedia content, interactive messages, or conducting polls within WhatsApp chats or groups.
Practical examples include:
- Sending a text alert to a customer.
- Sharing an image or video file from previous workflow steps.
- Sending a contact card or location information.
- Creating interactive messages with buttons or lists for user responses.
- Conducting polls in group chats.
Properties
| Name | Meaning |
|---|---|
| Message Type | Type of message to send. Options: Text, Image, Audio, Video, Document, Sticker, Location, Contact, Template, Buttons, List, Poll. |
| Phone Number or Group ID | Target phone number (without + or spaces) or group ID to send the message to. |
| Message | Text content of the message (used for Text and Buttons message types). |
| Image Source | Source of the image: Binary data from previous node, Base64 encoded string, or URL (for Image message type). |
| Binary Property | Name of binary property containing the image (when using binary source). |
| Base64 Image | Base64 encoded image string with data URL prefix (when using base64 source). |
| Image URL | URL to the image file (when using URL source). |
| Caption | Caption text for image or video messages. |
| Audio Source | Source of the audio: Binary data, Base64 encoded string, or URL (for Audio message type). |
| Audio Binary Property | Name of binary property containing the audio (when using binary source). |
| Base64 Audio | Base64 encoded audio string in opus format (when using base64 source). |
| Audio URL | URL to the audio file (when using URL source). |
| Video Source | Source of the video: Binary data, Base64 encoded string, or URL (for Video message type). |
| Video Binary Property | Name of binary property containing the video (when using binary source). |
| Base64 Video | Base64 encoded video string (H.264 codec, AAC audio) (when using base64 source). |
| Video URL | URL to the video file (when using URL source). |
| Document Source | Source of the document: Binary data, Base64 encoded string, or URL (for Document message type). |
| Document Binary Property | Name of binary property containing the document (when using binary source). |
| Base64 Document | Base64 encoded document string (when using base64 source). |
| Document URL | URL to the document file (when using URL source). |
| File Name | Name of the document file (required for Document message type). |
| Sticker Source | Source of the sticker: Binary data, Base64 encoded string, or URL (for Sticker message type). |
| Sticker Binary Property | Name of binary property containing the sticker (when using binary source). |
| Base64 Sticker | Base64 encoded sticker in WebP format (when using base64 source). |
| Sticker URL | URL to the sticker file (when using URL source). |
| Latitude | Latitude coordinate (required for Location message type). |
| Longitude | Longitude coordinate (required for Location message type). |
| Location Name | Name of the location (optional for Location message type). |
| Contact Name | Full name of the contact (required for Contact message type). |
| VCard | VCard data string for the contact (required for Contact message type). |
| Content | Main content of the template message (required for Template message type). |
| Footer | Footer text for the template message (optional). |
| Buttons | Buttons to add to the template message. Each button has display text and type (Quick Reply, URL, Call). URL and Call types require additional parameters. |
| Button Text | Text for the list button (required for List message type). |
| Description | Description of the list (required for List message type). |
| Top Text | Header text shown above the list (required for List message type). |
| Footer Text | Text shown below the list (optional for List message type). |
| List Items | Items in the list, each with Title, optional Description, and unique Row ID (required for List message type). |
| Poll Question | Question text for the poll (required for Poll message type). |
| Poll Options | Comma-separated list of poll options (required for Poll message type). |
| Additional Options | Collection of additional options including: custom message ID, reply to a specific message (with message ID and participant), and mentions configuration (none, specific users by JIDs, or all group members). |
Output
The node outputs JSON data representing the response from the Wuzapi WhatsApp API after sending the message. The output includes details about the sent message or error information if the request failed.
If the message includes media (image, audio, video, document, sticker), the node processes binary data accordingly, but the output JSON primarily contains metadata and status information from the API.
Dependencies
- Requires connection to the Wuzapi WhatsApp API service.
- Requires an API key credential configured in n8n for authenticating requests to Wuzapi.
- Uses helper functions to prepare media data from binary buffers.
- The node sends HTTP POST requests to various Wuzapi endpoints depending on the message type.
Troubleshooting
- Binary Property Not Found: If the specified binary property does not exist in the input data, the node throws an error indicating the missing property. Ensure that the previous node provides the expected binary data under the correct property name.
- Invalid Media Format: Providing incorrectly formatted base64 strings or invalid URLs may cause the API to reject the message. Verify that base64 strings have proper data URL prefixes and URLs are accessible.
- Missing Required Fields: Some message types require mandatory fields (e.g., phone number, message body, file name for documents). Omitting these will cause errors.
- Mentions Misconfiguration: When using mentions, ensure that user JIDs are correctly formatted and comma-separated without extra spaces.
- Polls Only for Groups: Poll messages can only be sent to group IDs; sending to individual numbers will fail.
- API Errors: Any errors returned by the Wuzapi API will be included in the output JSON. Check the error message for details and verify API credentials and usage limits.
Links and References
- Wuzapi WhatsApp API Documentation (example link, replace with actual)
- WhatsApp Business API Overview
- n8n Documentation - Creating Custom Nodes