# Doctor appointment management system with Gemini and WhatsApp: n8n workflow

> Started by an incoming WhatsApp message, and works across Google Sheets and WhatsApp. It puts Gemini behind a retrieval step, so answers are drawn from...

Source: https://millionrounds.com/workflow/doctor-appointment-management-system-with-gemini-and-whatsap (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# Doctor appointment management system with Gemini and WhatsApp

Started by an incoming WhatsApp message, and works across Google Sheets and WhatsApp. It puts Gemini behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 35 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdoctor-appointment-management-system-with-gemini-and-whatsap)

**35 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 5 Model 5 Logic 3 Service 22

The steps in the order they run, from what starts it.

- 1 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 2 **WhatsApp Trigger** Whats App trigger *Starts it*
- 3 **Simple Memory** Memory Buffer Window *Model*
- 4 **Date & Time** Date Time Tool *Service*
- 5 **Get Patient List For User** Google Sheets Tool *Service*
- 6 **Add Patient** Google Sheets Tool *Service*
- 7 **Get User Appointments** Google Sheets Tool *Service*
- 8 **Add Appointment** Google Sheets Tool *Service*
- 9 **Get All Appointments** Google Sheets Tool *Service*
- 10 **Reschedule Appointment** Google Sheets Tool *Service*
- 11 **Cancel Appointment** Google Sheets Tool *Service*
- 12 **Config** Google Sheets Tool *Service*
- 13 **Schedule Trigger1** Schedule trigger *Starts it*
- 14 **Google Gemini Chat Model3** Lm Chat Google Gemini *Model*
- 15 **Get Appointment sheet1** Google Sheets Tool *Service*
- 16 **Date & Time2** Date Time Tool *Service*
- 17 **Send message in WhatsApp Business Cloud** Whats App Tool *Service*
- 18 **Google Sheets Trigger1** Google Sheets trigger *Starts it*
- 19 **Stripe Trigger1** Stripe trigger *Starts it*
- 20 **Look For New Appointment1** Google Sheets trigger *Starts it*
- 21 **AI Agent** Agent *Model*
- 22 **Appointment Reminder AI Agent1** Agent *Model*
- 23 **Check status "Cancelled"1** If *Logic*
- 24 **Retrieve Payment Session1** Http Request *Service*
- 25 **Check Appointment Payment Mode1** If *Logic*
- 26 **Send message** Whats App *Service*
- 27 **Check Is Amount Paid1** If *Logic*
- 28 **Mark Payment Paid1** Google Sheets *Service*
- 29 **Send Payment Confirmation1** Whats App *Service*
- 30 **Generate Stripe Payment Link1** Http Request *Service*
- 31 **Stripe Refund API1** Http Request *Service*
- 32 **Send Cancellation Message (CASH)** Whats App *Service*
- 33 **Send Payment Link1** Whats App *Service*
- 34 **Send Cancellation Message (STRIPE)** Whats App *Service*
- 35 **Update Refund Status1** Google Sheets *Service*

## How it's built

- **Starts on:** An incoming WhatsApp message
- **Steps:** 35, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Sheets, WhatsApp
- **Model:** Gemini
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Sheets and WhatsApp accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming WhatsApp message.

Does it use AI?

Yes. It calls Gemini. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 35 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 35 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fdoctor-appointment-management-system-with-gemini-and-whatsap)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[WhatsApp](https://millionrounds.com/workflows?service=WhatsApp#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**Send WhatsApp meeting briefs with Google Calendar and Gmail** 35 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/send-whatsapp-meeting-briefs-with-google-calendar-and-gmail)
- [**Post-surgery patient triage & follow-up system with Gemini** 36 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/post-surgery-patient-triage-and-follow-up-system-with-gemini)
- [**Trigger HVAC upsell campaigns from weather data** 36 steps · calls a model · GoHighLevel, WhatsApp](https://millionrounds.com/workflow/trigger-hvac-upsell-campaigns-from-weather-data)
- [**AI-Powered WhatsApp Chatbot: Complete Booking Assistant** 37 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/ai-powered-whatsapp-chatbot-complete-booking-assistant)
- [**Send AI-powered Slack briefings with Google Workspace** 33 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/send-ai-powered-slack-briefings-with-google-workspace)
- [**Automate pet grooming posts & bookings with Facebook** 32 steps · calls a model · Google Calendar, Google Sheets](https://millionrounds.com/workflow/automate-pet-grooming-posts-and-bookings-with-facebook)
