Photo Pipeline
Trigger: crew uploads photo to a job's Slack channel
1
Slack Bot receives the image via Slack Events API (real-time, always on)
2
Bot copies the photo to NAS at /Volumes/Construction Server/{job}/Photos from Slack/
3
Bot uploads the photo to QBO as an attachment on the matching customer record
4
Photo now lives in 3 places: Slack (original), NAS (backup), QBO (accounting)
Cash Invoice Handling
Trigger: daily at 6:00 AM (launchd)
1
Queries QBO API for invoices to cash-pay customers (^ marker in QBO display name, loaded live)
2
Exports each invoice to Excel + PDF (local archive)
3
Voids the invoice in QBO — cash customers get paper invoices only
4
Pool Brain invoice deletion is done manually by Christian (automation runs --skip-pb)
Contract → Go Live → Build
Trigger: a contract is signed and Christian tells Claude to Go Live
1
Contract Generator (web app) builds every budget and contract and saves it for Go Live
2
Go Live (Claude, terminal) creates the Slack channel + pinned spec sheet, the dashboard row, and the QBO customer + first invoice
3
Go Live also builds the NAS job folder (Work Logs + background work) and adds the job to the Milestone Payments sheet
4
From then on the Slack Bot, doc filer, triage and inspections keep the Dashboard current through construction
Health Monitoring V2
Trigger: every 15 minutes (launchd) — check count shown live above
1
Calls QBO API with live token to verify it works (not just file age). Checks token expiry math.
2
Logs into all 4 email accounts (3 Gmail + Outlook) via IMAP to verify credentials + mailbox access
3
Checks all 19 LaunchAgents loaded, always-on processes running, logs for errors + staleness
4
Pings every web app, NAS read test, Dashboard API. Posts failures to Slack #system-health, then redeploys this page