Quick overview
This workflow checks Google Calendar every 15 minutes to send WhatsApp appointment reminders 24 hours and 2 hours before events, logs sends in an n8n Data Table to avoid duplicates, and handles patient replies by confirming in Google Calendar or emailing the front desk via Gmail.
How it works
- Runs every 15 minutes on a schedule.
- Pulls events from Google Calendar for the next 25 hours and reads previously sent reminders from an n8n Data Table.
- Selects events that are due for a 24-hour or 2-hour reminder, extracts the patient phone number from the event description, and skips anything already logged.
- Sends a WhatsApp template message with Confirm and Reschedule quick-reply buttons and records the send in the Data Table.
- Triggers when an inbound WhatsApp message arrives and parses the button payload or text to determine the patient’s intent.
- If the patient confirms, updates the Google Calendar event color to mark it confirmed and sends a WhatsApp confirmation message.
- If the patient requests rescheduling or sends any other message, emails the front desk via Gmail (including the calendar link for reschedules) and sends a WhatsApp acknowledgement only for reschedule requests.
Setup
- Add credentials for Google Calendar, WhatsApp Cloud API (Meta), and Gmail in n8n.
- Create an n8n Data Table named
appointment_reminders with text columns eventId, type, phone, and sentAt.
- In WhatsApp Manager, create a template named
appointment_reminder (language en) with two body variables and two quick-reply buttons (Confirm and Reschedule).
- Update the workflow with your WhatsApp phone number ID (
phoneNumberId) and set the front-desk recipient address in both Gmail email actions.
- Ensure each Google Calendar event description contains the patient number in a parsable format such as
Phone: +44 7700 900123, and connect the WhatsApp Trigger webhook in your Meta app configuration.