Send Automatic WhatsApp Order Confirmations from Shopify with Rapiwa API
Who’s it for
This n8n workflow helps Shopify store owners automatically confirm orders via WhatsApp. It validates customer numbers using Rapiwa API, sends personalized messages, and logs everything in Google Sheets.
A low-cost alternative to the WhatsApp Business API for solo entrepreneurs or small teams.
Features
- Receives new order details via webhook.
- Processes batches efficiently.
- Extracts and formats customer/order details.
- Strips non-numeric characters from numbers.
- Validates WhatsApp numbers via Rapiwa API.
- Branches workflow based on validity.
- Sends WhatsApp confirmation messages.
- Updates Google Sheet with
status and validity.
How it Works
- Triggered by Shopify webhook or Google Sheet input.
- Normalizes and cleans payload.
- Extracts customer, shipping, items, and payment info.
- Cleans phone numbers.
- Checks WhatsApp registration via Rapiwa API.
If Valid
- Sends templated WhatsApp message.
- Updates sheet:
validity = verified, status = sent.
If Invalid
- Skips sending.
- Updates sheet:
validity = unverified, status = not sent.
Adds delay between sends and keeps a full audit trail.
Setup Instructions
- Create Shopify webhook or Google Sheet input trigger.
- Create Google Sheet with columns:
name, number, order id, item name, total price, validity, status.
- Add Rapiwa Bearer token in n8n.
- Add Google Sheets OAuth2 credential.
- Configure workflow nodes:
- Trigger (Webhook / Sheet)
- SplitInBatches
- Normalize Payload (Code)
- Clean WhatsApp Number (Code)
- Rapiwa WhatsApp Check (HTTP Request)
- If Condition
- Send WhatsApp Message
- Update Google Sheet
- Wait Node
Requirements
- Shopify store with webhook.
- Verified Rapiwa API token.
- n8n instance with HTTP + Google Sheets nodes.
- Proper Google Sheet structure + OAuth.
Workflow Customization
- Edit WhatsApp message template.
- Add custom country-code logic.
- Use unique order IDs.
- Adjust Wait delay (5–10s recommended).
- Add logic for discounts or multiple line items.
Workflow Highlights
- Triggered by Shopify webhook.
- Cleans and extracts order data.
- Validates WhatsApp numbers via Rapiwa.
- Sends confirmations using
send-message endpoint.
- Logs every result in Google Sheets.
Setup in n8n
1. Check WhatsApp Registration
URL: https://app.rapiwa.com/api/verify-whatsapp
Method: POST
Auth: HTTP Bearer Token
Body: { "number": "cleaned_number" }
2. Branch Based on Validity
{{ $json.data.exists }} == true
Sample Google Sheet
| name |
number |
order id |
item name |
total price |
validity |
status |
| John Doe |
8801234567890 |
1001 |
Sample Product |
500 |
verified |
sent |
| Jane Smith |
8801987654321 |
1002 |
Another Product |
1500 |
verified |
sent |
Tips
- Ensure numbers have country code.
- Clean numbers with
replace(/\D/g, '').
- Parse Rapiwa API response accurately.
- Use unique order IDs.
- Add 3–10s delay to avoid rate limits.
Important Notes
- Do not reorder sheet rows.
- Confirm correct credential mapping.
- Test before going live.
- Rapiwa has request limits.
- Media sending available via
message_type: media.
Future Enhancements
- Telegram/Slack alerts.
- Media attachments (product images, invoices).
- Retry failed messages.
- Shopify GraphQL enhancements.
- Auto-fulfillment based on WhatsApp confirmation.
Support & Community