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