Overview
This node integrates with the Zapin WhatsApp API to send various types of WhatsApp messages programmatically. It supports sending text messages, media files (images, videos, audio, documents), stickers, polls, and location data. This node is useful for automating WhatsApp communications in workflows such as customer support, marketing campaigns, surveys, or notifications.
Practical examples:
- Sending a text notification to a customer when their order status changes.
- Sharing an image or video product demo via WhatsApp.
- Conducting quick polls or surveys by sending poll questions.
- Sending location coordinates for event venues or delivery tracking.
Properties
| Name | Meaning |
|---|---|
| Action | The type of WhatsApp message to send. Options: Send Text, Send Media, Send Poll, Send Sticker, Send Location. |
| Sender Number | The WhatsApp number from which the message will be sent. |
| Recipient Number | The WhatsApp number of the message recipient. |
| Message | The text content of the message (used only when Action is "Send Text"). |
| Media URL | The URL of the media or sticker to send (used when Action is "Send Media" or "Send Sticker"). |
| Caption | A caption for the media file (used only when Action is "Send Media"). |
| Media Type | The type of media being sent. Options: Image, Video, Audio, Document (used only when Action is "Send Media"). |
| Poll Title | The title/question of the poll (used only when Action is "Send Poll"). |
| Poll Options (Comma Separated) | Comma-separated list of options for the poll (used only when Action is "Send Poll"). |
| Single Choice? | Whether the poll allows only a single choice (true/false) (used only when Action is "Send Poll"). |
| Latitude | Latitude coordinate for location sharing (used only when Action is "Send Location"). |
| Longitude | Longitude coordinate for location sharing (used only when Action is "Send Location"). |
Output
The node outputs an array with one item per input item processed. Each output item contains a json object with the following structure:
status:"success"if the message was sent successfully, or"error"if there was a failure.action: The action performed (e.g.,sendMessage,sendMedia).response: The full response from the Zapin API on success.message: Error message string if the request failed.data: Additional error data returned by the API if available.
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the Zapin WhatsApp API.
- The node makes HTTP POST requests to endpoints under
https://zapin.my.id/for different message types. - No additional environment variables are required beyond the API key credential.
Troubleshooting
- Unsupported action error: If an invalid action is selected, the node throws an error indicating the action is unsupported. Ensure the action property is set to one of the supported options.
- HTTP request failures: Network issues, invalid API keys, or incorrect parameters can cause errors. The node returns error details in the output's
messageanddatafields. - Invalid phone numbers: Make sure sender and recipient numbers are in the correct format expected by WhatsApp and the Zapin API.
- Missing required properties: For each action, ensure all required fields (e.g., media URL for media actions, poll options for polls) are provided.
- API limits or restrictions: Check your Zapin API account for any rate limits or usage restrictions that might block requests.
Links and References
- Zapin WhatsApp API Documentation (assumed official docs for reference)
- WhatsApp Business API Overview
- n8n HTTP Request Node documentation for understanding underlying HTTP calls: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/