Automation library · Scheduling

Send AI pre-op reminders with Google Calendar and Gmail

Started by another system calling it, and works across Gmail, Google Calendar, Google Sheets and Slack. It hands the judgement calls to Azure OpenAI. 16 steps, 1 branch: a working afternoon to understand properly.

MediumCalls a model: Azure OpenAI

16 stepsMedium: a working afternoon
1Branch: places the flow splits
0Loops or waits
4Services it connects to

The flow

Starts it 3Model 3Logic 5Service 5

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

  1. 1Schedule Trigger: Daily 9:00 AMSchedule triggerStarts it
  2. 2LLM: Azure OpenAI Chat Model (gpt-4o)Lm Chat Azure Open AiModel
  3. 3Parse AI Output (Subject/Body JSON)Output Parser StructuredModel
  4. 4Webhook: Patient Checklist Confirmation (GET /confirm)WebhookStarts it
  5. 5Schedule Trigger: Periodic Confirmation CheckSchedule triggerStarts it
  6. 6Google Calendar: Fetch Today’s EventsGoogle CalendarService
  7. 7AI: Generate Pre-Op Checklist Email (Subject + HTML Body)AgentModel
  8. 8Parse Query Params + Mark Confirmed (patient_id, uniqueId, confirmedAt)CodeLogic
  9. 9Google Sheets: Fetch Patient Confirmation RowsGoogle SheetsService
  10. 10Extract Surgery Events + Patient FieldsCodeLogic
  11. 11Gmail: Send Pre-Op Checklist ReminderGmailService
  12. 12Google Sheets: Upsert Patient Confirmation StatusGoogle SheetsService
  13. 13IF: Confirmed = true (route unmatched = not confirmed)IfLogic
  14. 14Build Unique Confirmation Link (confirmUrl)CodeLogic
  15. 15Slack: Alert Nurse/Owner, Checklist Not ConfirmedSlackService
  16. 16Clean Patient Fields (Name/Email/Phone/ID)CodeLogic

How it's built

Starts on
Another system calling it
Steps
16, with 1 branch
Size
Medium: a working afternoon
Connects to
Gmail, Google Calendar, Google Sheets, Slack
Model
Azure OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Calendar, Google Sheets and Slack accounts, and a key for Azure OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling it.

Does it use AI?

Yes. It calls Azure OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Plan an afternoon. 16 steps is enough that you should read each one before running it.

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 16 steps before you point it at anything that matters.