Shopify + WhatsApp: send VIP discount codes fast
You create a fresh discount code in Shopify… and then the real work starts. Finding your best customers, cleaning phone numbers, sending messages one by one, and hoping you didn’t miss anyone.
This is the kind of mess that hits store owners first, but marketers and customer teams feel it too. With WhatsApp discount automation, your VIPs get the code fast, and you get a clean activity log without chasing screenshots.
Below is the exact workflow: what breaks in the manual approach, how the automation runs in n8n, and what you can tweak to match your store’s VIP rules.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Shopify + WhatsApp: send VIP discount codes fast
flowchart LR
subgraph sg0["Flow 1"]
direction LR
n0["<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/webhook.dark.svg' width='40' height='40' /></div><br/>Webhook"]
n1@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n2@{ icon: "mdi:cog", form: "rounded", label: "Wait", pos: "b", h: 48 }
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/code.svg' width='40' height='40' /></div><br/>Clean WhatsApp Number"]
n4["<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 Webhooks Response Data"]
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n6["<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 Sho.."]
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/code.svg' width='40' height='40' /></div><br/>Clean Customer Data In Shopi.."]
n8@{ icon: "mdi:database", form: "rounded", label: "Save data Sheet Unverified &..", pos: "b", h: 48 }
n9@{ icon: "mdi:database", form: "rounded", label: "Save data in Sheet Verified ..", pos: "b", h: 48 }
n10@{ icon: "mdi:web", form: "rounded", label: "Rapiwa", pos: "b", h: 48 }
n11@{ icon: "mdi:web", form: "rounded", label: "Rapiwa1", pos: "b", h: 48 }
n1 --> n11
n1 --> n8
n2 --> n5
n10 --> n1
n11 --> n9
n0 --> n4
n5 --> n3
n3 --> n10
n4 --> n6
n9 --> n2
n7 --> n5
n8 --> n2
n6 --> n7
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 n1 decision
class n8,n9 database
class n0,n6,n10,n11 api
class n3,n4,n7 code
classDef customIcon fill:none,stroke:none
class n0,n3,n4,n6,n7 customIcon
The Problem: VIP discounts get created, but not delivered
A VIP discount is only valuable if the right people actually receive it while it’s still exciting. But once you’re doing this manually, the process gets weirdly fragile. Someone has to export or search customer lists, decide who “counts” as VIP today, copy the code into a message, and then send it out. Meanwhile, phone numbers are inconsistent (missing country codes, extra spaces), and WhatsApp delivery is a coin flip if the number isn’t real. Even if you do everything right, tracking is painful. You end up with scattered notes, partial logs, and no simple answer to “Who got this code?”
It adds up fast. Here’s where it breaks down in day-to-day operations.
- Sending 30 to 60 messages manually can swallow about 1 to 2 hours per promo.
- Unverified WhatsApp numbers waste time and make your outreach look sloppy.
- When results aren’t logged in one place, you can’t learn what offers actually work.
- Teams hesitate to run more promos because the “send” part becomes the bottleneck.
The Solution: auto-send WhatsApp codes to VIPs and log everything
This n8n workflow listens for a Shopify discount creation webhook, then does the outreach work for you. It takes the discount code details from Shopify, pulls customer data, and filters down to your high-spend segment (your VIPs). Next, it cleans each phone number into a WhatsApp-friendly format, checks if that number is actually active on WhatsApp using Rapiwa’s verification endpoint, and only then sends the promo message. Every attempt is recorded in Google Sheets, so you can see verified sends, skipped contacts, and failures in one place. It also throttles requests and processes in batches (up to 60 rows per cycle) so you don’t trip rate limits.
The workflow starts when Shopify fires a webhook for a new discount code. From there, it gathers and filters customers, validates WhatsApp numbers through Rapiwa, then sends the message and writes the outcome to Google Sheets.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you drop a new VIP discount in Shopify and want to message 60 top customers. Manually, if you spend roughly 2 minutes per person to copy the code, check the number, send, and note it down, that’s about 2 hours. With this workflow, the “work” is basically creating the discount and letting the webhook trigger the run. The batch processes up to 60 rows in the background, and Google Sheets ends up with a clear “sent” or “not sent” status for each contact.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Shopify to trigger on discount creation
- Rapiwa to verify numbers and send WhatsApp
- Google Sheets to log sends and statuses
- Rapiwa Bearer Token (get it from the Rapiwa dashboard)
Skill level: Beginner. You’ll connect accounts, paste a token, and match a few sheet columns.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A Shopify discount code is created. Shopify sends a webhook into n8n with the code and basic metadata, so the workflow can react immediately without anyone pushing buttons.
Customer data is pulled and shaped for outreach. The workflow retrieves Shopify customers, formats the payload, and filters down to high-spend clients so you’re not blasting everyone who ever bought a $10 item.
Numbers get cleaned, then verified in Rapiwa. Each customer is processed in batches, phone digits are sanitized, and Rapiwa checks whether the number is active on WhatsApp before the workflow even tries to message it. Frankly, this is where a lot of manual workflows fall apart.
Messages go out and everything is logged. Verified numbers receive the promo message through Rapiwa, and both “sent” and “not sent” outcomes are written back into Google Sheets for simple reporting later.
You can easily modify the VIP filter to match your real segmentation (total spend, tags, last order date). See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Webhook Trigger
Set up the webhook endpoint that Shopify will call when a discount is created or updated.
- Add the Incoming Webhook Trigger node and set HTTP Method to
POST. - Set the Path to
a9b6a936-e5f2-4d4c-9cf9-182de0a970d5. - Copy the generated webhook URL and register it in Shopify’s webhook settings for discount events.
Step 2: Connect Shopify and Normalize the Webhook Payload
Fetch customers from Shopify and normalize incoming webhook fields for later use in messaging and logs.
- In Format Webhook Payload, keep the provided JavaScript that maps
admin_graphql_api_id,title,status, andcreated_atfrom the webhook body. - In Retrieve Shopify Customers, set URL to
https://your_domain_/admin/api/2025-07/customers.json. - Enable Send Headers and set X-Shopify-Access-Token to
[CONFIGURE_YOUR_API_KEY]. - Confirm the execution flow: Incoming Webhook Trigger → Format Webhook Payload → Retrieve Shopify Customers.
Step 3: Set Up Customer Filtering and Number Cleanup
Filter high-spend customers, batch them, and clean phone numbers before verification.
- In Filter High-Spend Clients, keep the JavaScript that filters customers with
total_spent > 5000and maps fields likecustomerNameandnumber. - Connect Filter High-Spend Clients to Iterate Customer Batches to control batch processing.
- In Iterate Customer Batches, keep default options and ensure the second output routes to Sanitize WhatsApp Digits.
- In Sanitize WhatsApp Digits, retain the JavaScript that strips non-digit characters from
number.
Step 4: Verify WhatsApp and Send the Promo
Verify each number with Rapiwa, then send the WhatsApp promo to verified recipients.
- In Verify WhatsApp Status, set Number to
={{ $json.number }}and keep Operation asverifyWhatsAppNumber. - Credential Required: Connect your rapiwaApi credentials in Verify WhatsApp Status.
- In Verified Number Check, confirm the condition uses
={{ $json.data.exists }}with the boolean operatortrue. - In Dispatch WhatsApp Promo, set Number to
={{ $json.data.number }}. - Set Message Type to the provided template, keeping expressions like
{{ $('Sanitize WhatsApp Digits').item.json.customerName }}and{{ $('Format Webhook Payload').item.json.title }}. - Credential Required: Connect your rapiwaApi credentials in Dispatch WhatsApp Promo.
Step 5: Configure Logging and Throttling
Log verified and unverified attempts to Google Sheets and add a pause between batches.
- In Log Unverified Attempts, set Operation to
appendand keep the field mappings, includingstatusasnot sentandverifyasunverified. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Log Unverified Attempts.
- In Log Verified Sends, set Operation to
appendand keep the field mappings, includingstatusassentandverifyasverified. - Credential Required: Connect your googleSheetsOAuth2Api credentials in Log Verified Sends.
- Leave Pause Throttle with default settings to pace each batch and confirm the flow Log Verified Sends → Pause Throttle → Iterate Customer Batches.
[YOUR_ID] in both logging nodes, or rows won’t be written.Step 6: Test and Activate Your Workflow
Run a controlled test to ensure customer filtering, verification, logging, and messaging all work end-to-end.
- Click Execute Workflow and send a sample webhook payload to Incoming Webhook Trigger.
- Verify the execution flow reaches Retrieve Shopify Customers → Filter High-Spend Clients → Iterate Customer Batches.
- Confirm that verified numbers reach Dispatch WhatsApp Promo and the WhatsApp message is delivered.
- Check Google Sheets to ensure Log Verified Sends and Log Unverified Attempts append rows correctly.
- When the test succeeds, switch the workflow to Active to enable production execution.
Common Gotchas
- Google Sheets credentials can expire or need the right file permissions. If rows stop updating, check the n8n Google Sheets node connection and the sheet’s share settings first.
- If you’re using Wait nodes or external sending, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Rapiwa verification and sending can fail if your Bearer Token is expired or your WhatsApp line isn’t connected. Confirm status in the Rapiwa dashboard before you chase bugs inside n8n.
Frequently Asked Questions
About 30 minutes once your sheet and tokens are ready.
No. You’ll mostly connect accounts and paste your Rapiwa token. The workflow’s VIP filter is already built; you can adjust it later if you want.
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 costs (they advertise a free 200 messages to start, then a paid subscription).
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 should. Swap the “Filter High-Spend Clients” logic to use Shopify tags, lifetime spend thresholds, or “last order within 30 days,” depending on what VIP means in your store. You can also change the Google Sheet columns (for example, add campaign name or message variant) as long as the logging nodes write to the new fields. If you want the sheet to be the source of truth for who gets messages, adjust the “check/verify/status” flow so only marked rows are processed.
Usually it’s an expired or incorrect Bearer Token. Regenerate the token in your Rapiwa dashboard and update it in n8n, then confirm your WhatsApp number is still connected inside Rapiwa. If verification works but sending fails, you may be hitting messaging limits or sending too quickly; the workflow includes a Wait node for throttling, so increase that delay if needed.
This workflow processes up to 60 rows per cycle, and it can run every 5 minutes.
For this workflow, n8n is usually a better fit because batching, filtering, and conditional routing are built-in without turning every branch into an extra billed step. The WhatsApp verification-before-send pattern is also easier to control when you can inspect responses and write your own logic. Zapier or Make can still work if you’re doing something simple, like sending the same message to a short list. But once you care about VIP filtering, logging, and avoiding unverified numbers, the “simple” version tends to collapse. Talk to an automation expert if you want help choosing the cleanest approach.
You set up the workflow once, and VIP promos stop being a scramble. The automation handles the repetitive sending and logging so you can focus on the offer, not the admin.
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.