The flow
Starts it 2Logic 10Service 17
The steps in the order they run, from what starts it.
- 1When a utility bill is forwardedWebhookStarts it
- 2Daily follow up sweepSchedule triggerStarts it
- 3Normalize forwarded billSetLogic
- 4Find bills from yesterday or olderPostgresService
- 5Has a bill image attachedIfLogic
- 6Build follow up summaryCodeLogic
- 7Build GPT-4o vision requestCodeLogic
- 8Alert missing image on DiscordDiscordService
- 9Email missing image noticeGmailService
- 10Are there open billsIfLogic
- 11Read the bill with GPT-4o visionHttp RequestService
- 12Post follow up on DiscordDiscordService
- 13Post all clear on DiscordDiscordService
- 14Parse bill fieldsCodeLogic
- 15Email follow up to ownerGmailService
- 16Is the bill readableIfLogic
- 17Is the amount positiveIfLogic
- 18Store rejected billPostgresService
- 19Load tenants from rosterPostgresService
- 20Alert team on DiscordDiscordService
- 21Compute unit sharesCodeLogic
- 22Email invalid bill noticeGmailService
- 23Store bill in PostgresPostgresService
- 24Store unit chargesPostgresService
- 25Post split summary to DiscordDiscordService
- 26Email split summary to ownerGmailService
- 27Build tenant emailsCodeLogic
- 28Email each tenant their chargeGmailService
- 29Mark bill donePostgresService