Shopify Auto Send WhatsApp Thank-You Messages & Loyalty Coupons via Rapiwa API
Who Is This For?
This workflow is designed for Shopify store owners, marketers, and support teams to automatically message high-value customers on WhatsApp when new discount codes are created.
What This Workflow Does
- Fetches customer data from Shopify
- Filters customers with
total_spent > 5000
- Cleans phone numbers and normalizes to international format
- Verifies WhatsApp numbers via Rapiwa API
- Sends coupon or thank-you messages to verified numbers
- Logs each send attempt to Google Sheets with
status and validity
- Uses batching (SplitInBatches) and Wait nodes to avoid rate limits
Key Features
- Automated trigger via Shopify webhook (
discounts/create) or manual trigger
- Targeted messaging for high-value customers
- Pre-send verification reduces failed messages
- Google Sheets logging for auditing
- Rate-limit protection using Wait node
Step-by-Step Setup
- Prepare a Google Sheet with columns:
name, number, status, validity, check (optional)
- Configure n8n credentials:
- Shopify: Store access token
- Rapiwa: Bearer token
- Google Sheets: OAuth2 credentials
- Configure nodes:
- Webhook/Trigger: Shopify
discounts/create or Manual Trigger
- HTTP Request (Shopify): Fetch customer data
- Code Node: Filter customers and map fields
- SplitInBatches Node: Batch processing
- Code Node: Clean phone numbers
- HTTP Request (Rapiwa verify):
/verify-whatsapp
- IF Node: Branch based on
data.exists
- HTTP Request (Rapiwa send-message): Send coupon/thank-you
- Google Sheets Append/Update: Log
status and validity
- Wait Node: 2–5 seconds delay between sends
- Test with a small batch (2–5 records) before scaling
Google Sheet Structure
| Name |
Number |
Status |
Validity |
| Abdul Mannan |
8801322827798 |
not sent |
unverified |
| Abdul Mannan |
8801322827799 |
sent |
verified |
Requirements
- Shopify Admin API access
- Rapiwa account with Bearer token
- Google account with Sheets and OAuth2 credentials
- n8n instance with HTTP Request, Code, SplitInBatches, IF, Google Sheets, Wait nodes
Customization Ideas
- Adjust filters (order count, customer tags)
- Use dynamic message templates with name and coupon code
- Add SMS or email fallback for unverified numbers
- Send admin run summary via Slack or email
- Store logs in a database for deeper analysis
Important Notes
data.exists may be boolean or string — normalize before IF node
- Google Sheets column headers must match mapping keys exactly
- Keep Rapiwa and Shopify tokens secure in n8n credentials
- Start with small batches before scaling
Useful Links
Support & Help