🧾 Send fee-due WhatsApp reminders to students using Supabase
⚡ 79 views · 🧾 Invoice Processing
Description
Quick overview
This workflow runs daily to fetch pending student fee records from Supabase, filters fees due in three days, and sends WhatsApp Business template reminders via the Meta WhatsApp Cloud API, then updates Supabase to mark each reminder as sent.
How it works
- Runs every day at 9:00 AM on a schedule.
- Pulls all pending fee records from Supabase where
reminder_sentis false andstatusispending. - Filters the results to only students whose
due_datematches exactly three days from today. - Sends a pre-approved WhatsApp template message (Meta WhatsApp Cloud API) to each student’s phone number.
- Updates the corresponding Supabase row to set
reminder_sentto true so the reminder is not sent again.
Setup
- Create a Supabase project, add a
student_feestable (includingstudent_phone,due_date,amount_due,status, andreminder_sentfields), and ensure your fee records are stored there. - Add Supabase credentials in n8n and set the correct table name in the Supabase nodes.
- Set up Meta WhatsApp Business Cloud API access in n8n (system user token/credentials) and fill in your WhatsApp phone number ID.
- Create and get approval for a WhatsApp message template, then replace
REPLACE_WITH_YOUR_APPROVED_TEMPLATE_NAMEwith your template name. - Adjust the schedule time and the “due in 3 days” logic if you want reminders to go out at a different time or offset.
🔗 Nodes Used
Supabase, WhatsApp Business Cloud, Schedule Trigger, Filter
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File