Email Automation
Triage backflow compliance notices with Google Sheets, Gmail, Slack, OpenAI, and a state
On a schedule, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets, Slack.
What it does
## 📘 WORKFLOW DETAILS Backflow Preventer Compliance Router turns a municipal water utility's backflow-preventer device registry into a daily, auto-triaged cross-connection-control enforcement queue. Value prop: Cross-connection control officers manage hundreds to thousands of testable devices (RPZ, DCVA, PVB) under EPA/state annual-test mandates. Manually scanning a spreadsheet for who is overdue, drafting warning letters, and filing state non-compliance reports takes hours weekly and is easy to fall behind on. This workflow does it automatically, every morning. Who it's for: Municipal/investor-owned water utility cross-connection control programs, backflow testing compliance vendors, and public works departments. Execution walkthrough: 1. Schedule Trigger fires daily at 06:00. 2. Google Sheets reads the full device registry. 3. Split Out breaks it into one item per device. 4. Code computes days overdue, next due date and a 0-100 risk score. 5. Set normalises the record. 6. If checks the row has the minimum required fields; incomplete rows are flagged to Slack and stop. 7. Text Classifier (AI) assigns Critical Overdue / Due Soon / Compliant. 8. Switch routes each device down a different real-world action. 9. Critical devices get a state e-filing, a shutoff warning letter, and a Slack alert. 10. Due Soon devices get a courtesy reminder email. 11. Compliant devices are stamped for the log only. 12. Merge reconverges all three branches and Google Sheets appends one audit row per device. Node-by-node summary: see the sticky note above every node on the canvas. Expected input: a Google Sheets row per device with device_id, address, hazard_level, device_type, last_test_date, owner_email. Expected output: one appended audit-log row per device plus, for overdue devices, an HTTP filing, an email, and a Slack alert. Sticky colour legend: yellow-ish(1)=trigger, blue(2)=transform, purple(3)=AI, orange(4)=branch, green(5)=storage, red(6)=notify (n8n's built-in numeric colour indices).
The steps
- Daily Compliance Scan
- Fetch Backflow Device Registry
- Split Out Device Records
- Compute Days Since Last Test
- Normalize Device Record
- Check Device Data Completeness
- Flag Data Quality Issue
- Compliance Classifier Model
- Classify Compliance Status
- Route By Compliance Status
- File State Non-Compliance Report
- Send Test Reminder Notice
- Mark Registry Updated
- Send Shutoff Warning Letter
17 steps in total.
Similar automations
Monitoring, Ops & IncidentsMonitor WARN layoff notices with Apify, score them with OpenAI and alert Slack35 stepsEmail AutomationFind contractor leads in state license records with Apify, OpenAI, Sheets and Slack35 stepsDocuments, PDF & OCRScore Japanese procurement notices with OpenAI GPT-5-mini and send bid checklists to27 stepsDocuments, PDF & OCRFile water well completion reports with state APIs using OpenAI, Drive and Gmail18 steps