Skip to main content

Send AI pre-op reminders with Google Calendar, Gmail, Sheets, Slack and GPT-4o

Workflow preview

Send AI pre-op reminders with Google Calendar, Gmail, Sheets, Slack and GPT-4o preview
Open on n8n.io

Overview

πŸ“˜ Description

This workflow automates end-to-end pre-surgery checklist reminders and confirmation tracking for healthcare operations teams. It ensures patients receive timely preparation instructions, can confirm completion with a single click, and allows staff to monitor confirmation status in real timeβ€”without manual coordination. Every day at 9:00 AM, the workflow fetches surgery events from Google Calendar, extracts patient details from event descriptions, and generates a unique confirmation link for each patient. An AI assistant then creates a personalized, patient-friendly pre-op checklist email (subject + styled HTML body) that includes surgery details and a confirmation button. When a patient clicks the confirmation link, a webhook captures the confirmation, updates Google Sheets as the source of truth, and records the timestamp. A separate periodic scheduler scans the sheet for patients who have not confirmed within the expected window. If confirmation is missing, the assigned nurse or owner is alerted in Slack with full patient and surgery context for immediate follow-up. This creates a closed-loop system: reminder β†’ confirmation capture β†’ tracking β†’ escalation.

βš™οΈ What This Workflow Does (Step-by-Step)

▢️ Daily 9:00 AM Trigger Starts the pre-op reminder cycle automatically each morning. πŸ“… Fetch Today’s Surgery Events (Google Calendar) Pulls calendar events and filters only surgery-related entries. 🧾 Extract Patient Details from Event Description Parses patient name, email, phone, ID, procedure, and surgery time. πŸ”— Generate Unique Confirmation Link Creates a secure confirmUrl per patient with tracking parameters. βœ‰οΈ AI Email Generation (Subject + HTML Body) Uses Azure OpenAI (gpt-4o) to generate a calm, professional checklist email with: Surgery details Basic preparation checklist Green confirmation button linked to confirmUrl πŸ“€ Send Pre-Op Reminder via Gmail Delivers the styled HTML email directly to the patient. βœ… Confirmation Webhook (GET /confirm) Captures patient clicks, parses query parameters, and marks the checklist as confirmed. 🧾 Upsert Confirmation Status (Google Sheets) Stores and updates patient confirmation records as the operational source of truth. ⏳ Periodic Confirmation Check Runs on a schedule to scan all patient rows for missing confirmations. 🚨 Slack Alert for Missing Confirmations Notifies the nurse or owner with full patient context when confirmation is not received in time.

🧩 Prerequisites

β€’ Google Calendar OAuth2 β€’ Gmail OAuth2 β€’ Azure OpenAI (gpt-4o) credentials β€’ Google Sheets OAuth2 β€’ Slack API credentials β€’ Publicly accessible webhook URL for confirmation tracking

πŸ’‘ Key Benefits

βœ” Automated pre-op reminders at a fixed daily time βœ” Personalized AI-generated patient emails βœ” One-click confirmation tracking βœ” Google Sheets audit trail for operations βœ” Proactive Slack alerts for missing confirmations βœ” Reduced manual follow-ups and missed preparations

πŸ‘₯ Perfect For

  • Hospitals and surgical centers
  • Clinic operations teams
  • Care coordinators
  • Day-surgery facilities
  • Healthcare admin automation systems