Shopify to WhatsApp VIP coupons, logged in Sheets
Your best customers spend big… and then you thank them with nothing, because pulling lists, cleaning phone numbers, and sending WhatsApp messages one-by-one is a pain. Worse, you can’t tell what was sent, what failed, or which numbers were even on WhatsApp.
This Shopify WhatsApp coupons setup hits store owners first, but ecommerce marketers and support teams feel the mess too. You get a clean, repeatable way to message VIP buyers quickly, without spamming the wrong people or losing track of sends.
You’ll connect Shopify to Rapiwa, verify numbers before sending, and log every attempt in Google Sheets so you can trust your tracking later.
How This Automation Works
Here’s the complete workflow you’ll be setting up:
n8n Workflow Template: Shopify to WhatsApp VIP coupons, logged in Sheets
flowchart LR
subgraph sg0["Clicki Flow"]
direction LR
n0@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Clean WhatsApp Number"]
n3["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Check valid whatsapp number .."]
n4@{ icon: "mdi:database", form: "rounded", label: "Append Rows in Sheet Verifie..", pos: "b", h: 48 }
n5@{ icon: "mdi:database", form: "rounded", label: "Append Rows in Sheet Unverif..", pos: "b", h: 48 }
n6@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Send Message Using Rapiwa"]
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Get All Customer Data In Store"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Clean HTTP Request Data"]
n10@{ icon: "mdi:play-circle", form: "rounded", label: "Clicki", pos: "b", h: 48 }
n1 --> n7
n1 --> n5
n6 --> n0
n10 --> n8
n0 --> n2
n2 --> n3
n9 --> n0
n7 --> n4
n8 --> n9
n4 --> n6
n3 --> n1
n5 --> n6
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n10 trigger
class n1 decision
class n4,n5 database
class n3,n7,n8 api
class n2,n9 code
classDef customIcon fill:none,stroke:none
class n2,n3,n7,n8,n9 customIcon
Why This Matters: VIP WhatsApp Messages That Actually Get Sent
When a new discount code is created in Shopify, that’s a perfect moment to reward VIP customers. But the “simple” version usually turns into a scramble: export customers, sort by spend, copy numbers into a phone, discover half are formatted wrong, then send messages that may never deliver. If you’re doing this during a promo week, it gets chaotic fast. And if you’re not tracking what happened, you’ll end up re-sending to the same people or missing the ones who should’ve received the coupon in the first place. Honestly, it’s not just time. It’s trust.
The friction compounds. Here’s where it breaks down.
- You waste about 1–2 hours per campaign just cleaning and reformatting phone numbers for WhatsApp.
- Messages fail silently when the number isn’t on WhatsApp, so you think you “nurtured” VIPs when you didn’t.
- Manual sends don’t leave an audit trail, which means your team can’t answer “did we send it?” without guessing.
- When you scale to bigger lists, rate limits and batching become real problems, not theoretical ones.
What You’ll Build: Verified WhatsApp Coupon Sends + Clean Google Sheets Logs
This workflow watches for a discount-code moment (either via a Shopify event or by running it manually), then pulls your Shopify customers and focuses only on high-value buyers. It filters to customers with total spend above 5000, cleans up their phone numbers into a consistent international format, and checks each one against Rapiwa’s WhatsApp verification endpoint before sending anything. If the number is real on WhatsApp, it sends your thank-you or coupon message using the Rapiwa send-message API. If it’s not, it skips sending and logs that outcome instead. Either way, every attempt ends up recorded in Google Sheets with a status and validity, so you can track results without chasing screenshots.
It starts by fetching and filtering customers from Shopify. Then it loops through them in batches, verifying each WhatsApp number through Rapiwa. Finally, it sends the message (or skips) and writes a clear record into Google Sheets, with short waits between batches to stay friendly with rate limits.
What You’re Building
| What Gets Automated | What You’ll Achieve |
|---|---|
|
|
Expected Results
Say you have 200 VIP customers you want to thank when a new coupon drops. Manually, finding them, cleaning numbers, and sending even a short message can take about 2 minutes each, so you’re staring at roughly 6–7 hours of busywork. With this workflow, you trigger it once, then it verifies and sends in batches while logging everything to Sheets. You still wait for processing, but your hands-on time is closer to 10 minutes.
Before You Start
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Shopify for customer data and discount triggers.
- Rapiwa to verify WhatsApp numbers and send messages.
- Google Sheets to log status and validity per customer.
- Shopify Admin API access token (create in Shopify admin apps).
- Rapiwa Bearer token (get it from your Rapiwa dashboard).
Skill level: Intermediate. You won’t write “software,” but you will connect credentials, map a few fields, and test with small batches.
Want someone to build this for you? Talk to an automation expert (free 15-minute consultation).
Step by Step
A discount-trigger moment kicks it off. In practice, you can run this with a manual start while testing, then switch to a Shopify discounts/create webhook style trigger when you’re ready.
Shopify customers are pulled and filtered to VIPs. The workflow requests your customer list, then keeps only the people above your “high-value” threshold (total_spent > 5000) so you’re not blasting everyone.
Numbers are cleaned, verified, and routed. Phone fields are normalized (non-digits stripped, formatted consistently), then Rapiwa checks if the number exists on WhatsApp. An If step decides what happens next based on that verification result.
Messages go out and everything is logged. Verified numbers receive your thank-you/coupon message through Rapiwa, and Google Sheets records status plus validity. Unverified numbers get logged too, so you can follow up with email or SMS later if you want.
You can easily modify the VIP rule (total spend, tags, order count) or the message template (include name and coupon code) based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Manual Trigger
Start the workflow manually so you can test the full customer retrieval and messaging path before activating it.
- Add the Manual Start Trigger node as the workflow trigger.
- Keep the default settings; this trigger fires when you click Execute Workflow.
- (Optional) Keep Flowpast Branding as a sticky note for documentation; it does not affect execution.
Step 2: Connect Store Customer Source
Pull customers from your store API and pass them into the loyalty targeting logic.
- Add Retrieve Store Customers and connect it after Manual Start Trigger.
- Set URL to
https://your_shop_domain/admin/api/2025-07/customers.json. - Enable Send Headers and set header X-Shopify-Access-Token to
[CONFIGURE_YOUR_API_KEY].
your_shop_domain and [CONFIGURE_YOUR_API_KEY] with your real Shopify domain and API token or the request will fail.Step 3: Set Up Customer Filtering and Batching
Filter to high-value customers, then iterate through them in batches before validation.
- Add Filter High-Value Customers after Retrieve Store Customers.
- Keep the JavaScript in Filter High-Value Customers as-is to filter customers where
totalSpent > 5000. - Add Batch Customer Iterator after Filter High-Value Customers. Optionally set a batch size in the node options if you want to throttle customer volume.
- Connect the second output of Batch Customer Iterator to Sanitize WhatsApp Digits to process each batch item.
- In Sanitize WhatsApp Digits, keep the JavaScript that strips non-digit characters from
phone.
Step 4: Configure WhatsApp Verification, Messaging, and Logging
Verify each phone number, branch on validity, send a WhatsApp message, and log outcomes in Google Sheets.
- Add Validate WhatsApp via Rapiwa after Sanitize WhatsApp Digits and set URL to
=https://app.rapiwa.com/api/verify-whatsapp, Method toPOST, and body parameter number to{{ $json.phone }}. - Credential Required: Connect your httpBearerAuth credentials to Validate WhatsApp via Rapiwa.
- Add Verification Branch after Validate WhatsApp via Rapiwa and set the condition to
{{ $json.data.exists }}is true. - On the true branch, add Dispatch Rapiwa Message with URL
=https://app.rapiwa.com/api/send-message, MethodPOST, and body parameters: number{{ $json.data.number }}, message_typetext, and message set to the provided WhatsApp message template. - Credential Required: Connect your httpBearerAuth credentials to Dispatch Rapiwa Message.
- After Dispatch Rapiwa Message, add Log Verified Sends with Operation
append, Document ID[YOUR_ID], and Sheetgid=[YOUR_ID]. Map columns to{{ $('Sanitize WhatsApp Digits').item.json.customerName }}and{{ $json.to }}, plus static valuessentandverified. - Credential Required: Connect your googleSheetsOAuth2Api credentials to Log Verified Sends.
- On the false branch of Verification Branch, add Log Unverified Skips with Operation
append, Document ID[YOUR_ID], and Sheetgid=[YOUR_ID]. Map name to{{ $('Sanitize WhatsApp Digits').item.json.customerName }}, number to{{ $json.data.number }}, and static valuesnot sentandunverified. - Credential Required: Connect your googleSheetsOAuth2Api credentials to Log Unverified Skips.
- Add Pause Between Batches after both Log Verified Sends and Log Unverified Skips, then connect it back to Batch Customer Iterator to continue processing the next batch.
Step 5: Test and Activate Your Workflow
Validate the data flow, confirm logging, and then enable the workflow for production use.
- Click Execute Workflow to run Manual Start Trigger and process a test batch.
- Confirm that Validate WhatsApp via Rapiwa returns an
existsvalue and Verification Branch routes correctly. - Verify that successful sends appear in Log Verified Sends and rejected numbers appear in Log Unverified Skips.
- When results look correct, set the workflow to Active to use it in production.
Troubleshooting Tips
- Shopify credentials can expire or need specific permissions. If things break, check your Shopify Admin API token scopes and the X-Shopify-Access-Token value in n8n credentials first.
- If you’re using Wait nodes or external sending, processing times vary. Bump up the wait duration (like 2 to 5 seconds) if downstream steps fail because responses are empty or delayed.
- Rapiwa’s verify response can come back as a boolean or a string in some setups. If your If branch behaves oddly, normalize the exists value in a small code step before the decision.
Quick Answers
About 30–60 minutes if your tokens and sheet are ready.
No. You’ll mostly connect accounts and adjust a few fields, although there are small prebuilt code steps already included for filtering and phone cleanup.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Rapiwa API costs based on your message volume.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Yes, and you probably should. You can change the “VIP” filter in the Filter High-Value Customers step (for tags, order count, or a different spend threshold), then edit the message body in the Rapiwa send-message step. Common tweaks include inserting the customer’s first name, pulling the actual discount code into the text, and adding a fallback path that logs unverified numbers for email outreach.
Usually it’s an invalid or expired Bearer token. Regenerate the token in your Rapiwa dashboard and update the HTTP Bearer credential in n8n, then re-run a small batch. If verification works but sending fails, check the exact request body fields (number, message_type, message) and make sure your numbers are in the format Rapiwa expects after the sanitize step.
A lot, as long as you batch it and respect sending limits. On n8n Cloud, your practical ceiling depends on your execution quota and how long each run takes with waits; on self-hosting, you’re mainly limited by your server and the Shopify/Rapiwa API rate limits. Most stores run this in chunks of a few hundred contacts per campaign, which is exactly why the Split in Batches + Wait pattern is in the workflow.
Often, yes. This flow needs batching, conditional routing (verified vs unverified), and structured logging, and n8n handles that without turning it into a pile of paid “tasks.” Self-hosting is also a big deal if you run lots of campaigns. Zapier or Make can still work if you keep it very simple, but verification + rate-limit protection usually gets awkward. If you’re unsure, Talk to an automation expert and describe your volume and message cadence.
Once this is running, VIP outreach stops being a scramble and starts being a system. The workflow handles the repetitive parts, and your team gets the credit for a better customer experience.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.