The flow
Starts it 2Model 2Logic 9Service 12
The steps in the order they run, from what starts it.
- 1When Email is ReceivedGmail triggerStarts it
- 2Claude Sonnet ModelLm Chat AnthropicModel
- 3Check for Approved RepliesSchedule triggerStarts it
- 4Normalize Email ContentCodeLogic
- 5Process with Claude AIChain LlmModel
- 6Find Threads Labeled send-approvedGmailService
- 7Fetch Full Thread HistoryGmailService
- 8Parse and Validate ResponseCodeLogic
- 9Extract Approved Thread IDsCodeLogic
- 10Build Conversation TranscriptCodeLogic
- 11Escalation Needed?IfLogic
- 12Read Pending RepliesGoogle SheetsService
- 13Set Business ProfileSetLogic
- 14Send Escalation AlertGmailService
- 15Check if Reply is NeededIfLogic
- 16Match Approved to PendingCodeLogic
- 17Create Draft Reply in GmailGmailService
- 18Append to Email LogGoogle SheetsService
- 19Send Approved Reply in ThreadGmailService
- 20Save Pending Reply for ApprovalGoogle SheetsService
- 21Mark Reply as SentGoogle SheetsService
- 22Clean Up the Leftover DraftGmailService
- 23Fetch Gmail LabelsGmailService
- 24Prepare Label RemovalCodeLogic
- 25Remove Approval Label from ThreadGmailService