Downloads
Download the n8n workflow (JSON)
repeat-customer-reorder-reminders-n8n.json · n8n workflow · 20 steps · starts with Every morning at 10 · uses Google Sheets, Shopify, Anthropic, Slack, WhatsApp · 31 KB
Import into n8n: Create Workflow, then the menu, then Import from File.
How to import it into n8n
- In n8n, create a new workflow.
- Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
- Open each node with a warning and connect your own account: the file carries no passwords or keys.
- Run it once with Test workflow, check the result, then switch it to Active.
What it does
Every morning the workflow reads the last 6 months of Shopify orders and your Refill rules sheet (which products run out, and how many days one pack lasts). For each customer and product it works out when they will run out: their own average gap if they have ordered twice or more, otherwise pack size times refill days. Anyone due in the next 3 days who opted in to messages, and who has not already been reminded this cycle, is picked. Claude writes one warm, specific line for each. The whole day's list comes to Slack once for your approval. Approved customers get a WhatsApp template with their line and a Shopify cart link that opens checkout with the same product and quantity. Every reminder is logged.
Who it is for
D2C brands selling things people use up: coffee, tea, pet food, skincare, supplements, water purifier filters, refills, diapers. Also pharmacies and service businesses with regular refills.
What you need
- An n8n account (n8n Cloud or self-hosted)
- A Shopify store and a custom app access token with read_orders and read_customers
- A Google Sheet with Refill rules and Reminders tabs
- An Anthropic API key for Claude
- A WhatsApp Business Cloud number with an approved 'reorder_reminder' Marketing template
- Slack with a #retention channel
How the workflow runs, node by node
The slides show the same steps. Open the workflow in n8n and you will see a sticky note over each one.
Step 1 · Learn each customer's rhythm
Every morning n8n reads 6 months of Shopify orders and your refill rules: which products run out, and how many days a pack lasts. Each order becomes one row per product per customer.
- Every morning at 10: Runs every day at 10 AM, a polite time for a WhatsApp reminder.
- Load refill rules: Reads your Refill rules tab: SKU, Product, Refill days (how long one pack lasts), Active. Only these products get reminders.
- Get recent orders: Pulls the last 180 days of Shopify orders with customer, phone and line items. Runs once.
- Flatten line items: Turns each order into one row per product, with customer id, first name, phone (with 91), consent, SKU, quantity and variant id.
Step 2 · Who runs out in the next 3 days?
For customers who ordered twice or more, n8n uses their own average gap. For first-timers, it uses pack size times days per pack. Anyone due in the next 3 days who opted in to messages is picked.
- Work out due date: Works out when each customer will run out: their own average gap between orders if they ordered twice or more, otherwise refill days times quantity. Builds a 1-tap Shopify cart link.
- Due in next 3 days?: Keeps customers who will run out in the next 0 to 3 days. Anyone who already reordered has a new due date and drops out on their own.
- Opted in only: Keeps only customers who agreed to marketing messages and have a valid Indian mobile number.
Step 3 · Never twice in one cycle
Your Reminders log is checked, so each customer gets one reminder per refill cycle, and at most one message a day, even if the workflow runs again.
- Read reminder log: Reads your Reminders tab once. Always output data is on, so an empty log is fine.
- Not reminded this cycle: Drops anyone already reminded for this cycle (same customer, product and due date) and keeps one message per customer per day.
Step 4 · Claude writes it, you approve the list
Claude writes one personal line per customer, like 'your 500 g Monsoon Malabar should be running low around now'. The whole day's list comes to Slack once: Send all, or Not today.
- Write reminder with Claude: Writes one warm, specific line per customer ('your 500 g Monsoon Malabar should be running low around now') for the template. No discounts, no pressure.
- Claude: Claude (claude-sonnet-5-5) at temperature 0.5, so answers stay consistent from run to run.
- Reminder schema: Forces one field, personal_line, capped at 90 characters so it fits the WhatsApp template.
- Combine reminder: Joins each customer's details with Claude's line in one clean item.
- Collect today's list: Packs today's reminders into one list, so you approve them all with one tap instead of one by one.
- Approve today's reminders: Posts today's list to #retention (name, product, due date, why, and the exact line) and waits up to 4 hours for Send all.
- Approved?: True only when you tapped Send all. Not today, or no answer, sends nothing; the same people come up again tomorrow while still due.
Step 5 · One tap to reorder
Each customer gets an approved WhatsApp template with their personal line and a Shopify link that opens checkout with the same product and quantity. Every reminder is logged, and failures alert you.
- One row per customer: Splits the approved list back into one item per customer.
- Send reorder reminder: Sends your approved 'reorder_reminder' WhatsApp template with name, Claude's line and the 1-tap Shopify cart link. Error output goes to the alert.
- Log reminder: Logs each reminder in the Reminders tab, keyed on Reminder key, so the same cycle is never reminded twice.
- Alert owner: Tells you in Slack about any reminder WhatsApp refused, for example a number that is not on WhatsApp.
Setup
- In n8n, create a new workflow, open the menu and choose Import from File, then pick the JSON file.
- Make a Google Sheet with a
Refill rulestab (SKU, Product, Refill days, Active) and aReminderstab (Reminder key, Sent at, Customer, Phone, Product, Due date, Why, Status). Add one row per product that runs out. Paste the URL in the three sheet nodes. - In Shopify, create a custom app with read_orders and read_customers, and create a Shopify access token credential on Get recent orders.
- Replace
YOUR_STOREin Work out due date with your myshopify.com store name, so the 1-tap cart links work. - Create an Anthropic credential on Claude and replace
YOUR_BRAND. - In WhatsApp Manager, create a Marketing template
reorder_reminder: 'Hi {{1}}, {{2}} Same again? Reorder in one tap: {{3}}'. Wait for approval, then connect WhatsApp on Send reorder reminder with your Phone number ID. - Connect Slack on Approve today's reminders and Alert owner.
- Make two test orders for yourself a few weeks apart (or set a short Refill days), run the workflow and check the Slack list and the WhatsApp. Then activate.
How to customise it
- Change the 3 day window in Due in next 3 days? (longer for products with delivery time).
- For customers on their 5th order, add a small loyalty thank-you, with a code only after approval.
- Use Google Sheets orders instead of Shopify for offline sales: swap Get recent orders for a Sheets read with the same columns.
- Add a second reminder 5 days after the due date for customers who did not reorder.
- For services (RO servicing, AC servicing), replace the cart link with a booking link.
Guardrails
Only opted-in customers are messaged, once per cycle, and only after you approve the day's list.
- Only customers who agreed to marketing messages and have a valid mobile number are messaged.
- One reminder per customer, per product, per refill cycle, and at most one message per customer per day.
- Nothing is sent until you tap Send all. Not today sends nothing.
- Claude is told never to offer discounts, add urgency, or claim to know the customer's stock.
- Customers who already reordered get a new due date and are never reminded about something they just bought.
Troubleshooting
- Nobody is ever due. Check that the SKU in Refill rules matches the SKU on your Shopify products exactly, and that Refill days is a number.
- Customers without consent show up. They should not: the filter reads Shopify's SMS marketing or accepts marketing flag. Check the customer's marketing settings in Shopify.
- The cart link opens an empty cart. Cart permalinks need the variant id, not the product id, and your myshopify.com domain in Work out due date.
- WhatsApp template error. The template name, language and three variables must match exactly what Meta approved.
- Get recent orders is slow. Large stores have many orders. Lower the 180 days, or run the workflow at night and approve in the morning.
Want the members-only resources too?
A free account unlocks them all, including the ones shared in DMs.

