Downloads
Download the n8n workflow (JSON)
whatsapp-payment-reminders-n8n.json · n8n workflow · 18 steps · starts with Every morning 10:30 · uses Google Sheets, Anthropic, Slack, WhatsApp · 30 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 (except Sunday) n8n reads your Invoices sheet and picks invoices that are exactly 1, 7 or 15 days past due. Before anything is sent, it asks Razorpay whether the payment link is already paid; if it is, the row is marked Paid and nothing goes out. Invoices without a link get one for the exact amount. Invoices of Rs 50,000 or more, and every final day 15 reminder, go to Slack first with a short brief from Claude (send or call, and a first line for the call). Everything else gets the right WhatsApp template for its stage with the invoice number, amount and payment link, and the sheet is updated.
Who it is for
Distributors, wholesalers, agencies, schools and B2B businesses that give credit and spend too much time (or awkwardness) chasing payments.
What you need
- An n8n account
- A Google Sheet with an
Invoicestab - Razorpay API keys (Payment Links enabled)
- WhatsApp Business Cloud API with three approved templates
- An Anthropic API key
- Slack (#collections)
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 · Find who is due today
Every morning n8n reads your Invoices sheet and picks invoices exactly 1, 7 or 15 days past due. Paid, paused and already reminded ones are skipped. Max 50 a day.
- Every morning 10:30: Runs at 10:30 AM, Monday to Saturday. No reminders on Sundays.
- Read unpaid invoices: Reads the Invoices tab: invoice number, customer, phone, amount, due date, Razorpay link, status and reminders sent so far.
- Who is due today?: Picks invoices that are 1, 7 or 15 days past due and have had 0, 1 or 2 reminders, skips paid, cancelled and paused ones and anything already reminded today. Cleans the phone and formats the amount. Max 50 a day.
- Has a payment link?: If the invoice already has a Razorpay link, check it. If not, create one first.
Step 2 · Paid already? It stops
Before every reminder, n8n asks Razorpay if the link is paid. Paid means the row is marked Paid and nothing is sent. No link yet? It creates one for the exact amount.
- Check Razorpay link: Asks Razorpay for the link's status right now. This is what stops reminders the moment the customer pays.
- Already paid?: If Razorpay says paid, no reminder goes out.
- Mark as paid: Marks the invoice Paid in the sheet, so it is never picked again.
- Create Razorpay link: Creates a Razorpay payment link for the exact invoice amount, with the invoice number as reference. Razorpay's own SMS and email reminders are switched off so the customer is not double reminded.
Step 3 · Big amounts go to you first
Rs 50,000 or more, or a final day 15 reminder? Claude writes you a short brief: send or call, and a warm first line for the call. You tap Send reminder or I'll call.
- Big amount or final?: Invoices of Rs 50,000 or more, and every day 15 final reminder, go to you first. Smaller day 1 and day 7 reminders go out on their own.
- Brief owner with Claude: For big or final reminders, writes you a one-line summary, whether a polite template or a personal call is better, and a warm first sentence for the call.
- Claude: Claude (claude-sonnet-5-5) at temperature 0.2, so answers stay consistent from run to run.
- Owner brief schema: Summary, suggestion and call opener as fixed fields for the Slack message.
- Ask owner in Slack: Posts the brief in #collections with 'Send reminder' and 'I'll call', and waits up to 8 hours.
- Owner approved?: Send reminder continues to WhatsApp. I'll call, or no answer, marks it for a call.
Step 4 · A kind WhatsApp, logged
The right template for the stage goes out with the invoice number, amount and Razorpay link. The row is updated. If WhatsApp fails, you get a Slack alert.
- Send WhatsApp reminder: Sends the approved template for this stage (gentle, follow-up or final) with name, invoice number, amount and the Razorpay link.
- Log reminder: Updates the invoice row: reminders sent, date, the payment link, and status like 'Reminder 2 sent'.
- Alert: reminder failed: Tells #collections if WhatsApp refused the template, so you can follow up by hand.
- Mark for a call: Marks the invoice 'Owner calling' so the automatic reminders pause until you change the status back.
Setup
- Import the JSON file into a new n8n workflow.
- Make a sheet tab
InvoiceswithInvoiceNo, Customer, Phone, Amount, DueDate, LinkId, LinkUrl, Status, RemindersSent, LastReminder, Paused, Notes, PaidAt. ReplaceYOUR_SHEET_ID. - Create a Razorpay credential (HTTP Basic: key id and key secret) and select it on Check Razorpay link and Create Razorpay link.
- In Meta WhatsApp Manager, create utility templates
payment_reminder_gentle,payment_reminder_followupandpayment_reminder_final, each with 4 variables: name, invoice number, amount, link. Wait for approval. - On Send WhatsApp reminder, create a WhatsApp API credential and replace
YOUR_PHONE_NUMBER_ID. - Create an Anthropic credential on Claude and put your business name in Brief owner with Claude.
- Connect Slack on Ask owner in Slack and Alert: reminder failed.
- Add a test invoice with your own number, a due date of yesterday and RemindersSent 0. Execute, check WhatsApp and the sheet. Then activate.
How to customise it
- Change the stages (for example day 3, 10, 20) in Who is due today?.
- Change the Rs 50,000 limit in Big amount or final?.
- Send a thank you when paid: add a Razorpay webhook for
payment_link.paidthat marks the row Paid and sends a thank-you template. - Pause a customer by typing
yesin Paused, for example during a dispute. - Copy your accountant on final reminders with a Gmail node after Log reminder.
Guardrails
Paid invoices stop automatically, and anything over Rs 50,000 or any final reminder waits for your tap in Slack.
- Razorpay is checked right before every send, so a paid customer is never reminded.
- Big amounts and every final reminder wait for 'Send reminder' in Slack. 'I'll call' pauses automation for that invoice.
- One reminder per stage, never twice in a day, never on Sunday, max 50 per day.
- Only Meta-approved templates are sent, never free text written by AI.
- Claude is told never to threaten or mention late fees that were not agreed.
Troubleshooting
- Nobody is due. DueDate must be a real date and RemindersSent a number (start at 0). The code needs an exact stage match: day 7 needs 1 reminder already sent.
- Razorpay 401. Use the key id as username and the secret as password. Test keys only see test links.
- Template error. The template name, language
enand exactly 4 variables must match the approved template. - Same customer reminded after paying in cash. Set Status to Paid in the sheet. Cash payments do not show in Razorpay.
Want the members-only resources too?
A free account unlocks them all, including the ones shared in DMs.

