The flow
Starts it 3Model 1Logic 8Service 17
The steps in the order they run, from what starts it.
- 1Receive Teacher Leave RequestForm triggerStarts it
- 2Weekly Schedule Trigger (Mondays 8am)Schedule triggerStarts it
- 3On Workflow ErrorError triggerStarts it
- 4Fetch Full Timetable from SheetsGoogle SheetsService
- 5Fetch Substitute AvailabilityGoogle SheetsService
- 6Fetch Today's Assigned SubstitutesGoogle SheetsService
- 7Read Payroll Sheet for DigestGoogle SheetsService
- 8Slack, Send Workflow Error AlertSlackService
- 9Telegram, Send Workflow Error AlertTelegramService
- 10Filter Classes for Absent TeacherCodeLogic
- 11Aggregate Substitute WorkloadCodeLogic
- 12Build AI Substitute Ranking PromptCodeLogic
- 13Slack, Send Weekly Workload DigestSlackService
- 14AI Rank Substitute CandidatesOpen AiModel
- 15Parse Ranked CandidatesCodeLogic
- 16Pick Next Available CandidateCodeLogic
- 17IF: Candidate Available?IfLogic
- 18Telegram, Confirm With SubstituteTelegramService
- 19Telegram, Escalate to AdminTelegramService
- 20IF: Substitute Accepted?IfLogic
- 21Email Assigned Substitute TeacherGmailService
- 22Log Decline & Increment AttemptCodeLogic
- 23Twilio, SMS Backup to SubstituteTwilioService
- 24Google Calendar, Block Substitute TimeGoogle CalendarService
- 25Notify Students of Class ChangeGmailService
- 26Send Admin Telegram SummaryTelegramService
- 27Mark Class as Covered in TimetableGoogle SheetsService
- 28Log Substitute Hours to Payroll SheetGoogle SheetsService
- 29Append to Audit LogGoogle SheetsService