Pool water tests usually end as a photo of a test strip and a guess about how much chlorine to add. This workflow takes the readings your tech already records, checks them against real chemistry targets, emails the homeowner a clear report, and logs the numbers so nothing depends on memory. It also tells you every morning which pools are due or overdue.
Last updated: November 2026.
Quick Overview
A POST webhook receives one water test from the field. The workflow checks that the required readings are there, matches the pool against a Google Sheets roster, and runs a deterministic chemistry engine covering free chlorine, total chlorine, pH, total alkalinity, cyanuric acid, salt, and the Langelier Saturation Index. A language model then writes the homeowner summary only. The reading, its status, and the dose recommendations go to two Sheets tabs, the customer gets the report by Gmail, the owner gets a Discord alert whenever the water is not balanced, and a 07:00 sweep posts the day route.
How it works
- Receives a POST on the pool/test webhook with pool id, customer name and email, free and total chlorine, pH, total alkalinity, cyanuric acid, water temperature, salt, and notes.
- Normalizes the payload, generates a test id, and timestamps the reading.
- Validates the intake: pool id, free chlorine, and pH are required. Anything missing goes to a Discord alert and an email notice instead of the log.
- Reads the Pools tab in Google Sheets and matches the pool id against the roster, ignoring case.
- If the pool is not on the roster, posts a Discord alert and sends the same notice by email, so the roster gets fixed before the next visit.
- Runs the chemistry engine: free chlorine 1 to 3 ppm, pH 7.2 to 7.8, total alkalinity 80 to 120 ppm, cyanuric acid 30 to 50 ppm, combined chlorine under 0.5 ppm, salt 2800 to 3600 ppm on salt pools, plus the Langelier Saturation Index. The result is balanced, attention, or critical, with a dose recommendation for each issue found.
- Passes the readings, issues, and doses to the report writer, which returns a homeowner summary under 90 words. If the model returns nothing usable, the workflow falls back to a plain summary built from the numbers.
- Appends the reading, status, and recommended chemicals to the TestLog and ChemLog tabs.
- Emails the customer the report with the full reading table.
- When the status is not balanced, posts the issues and actions to Discord; when it is balanced, posts a short logged-OK confirmation.
- Every morning at 07:00 reads the roster and the test log, flags pools whose service day is today and pools whose last test is more than nine days old, and posts the route to Discord with an email backup. If nothing is due, it posts an all clear.
Setup
- Create a Google Sheet with three tabs, Pools, TestLog, and ChemLog, using the column headers shown in the workflow nodes.
- Fill the Pools tab with pool id, customer name and email, address, pool type, volume in gallons, and service day.
- Connect the Google Sheets account used by the roster read, the two log appends, and the two sweep reads.
- Connect Gmail for the customer report and the owner notices, and replace the owner address placeholder on the three notice nodes.
- Add OpenAI credentials on the Report Writer Model node.
- Add the Discord credential and point the six Discord nodes at the channel that should receive alerts.
- Point the field app at the pool/test webhook, and adjust the 07:00 schedule if your crews start earlier.
Quick Answers
Does the model decide what chemicals to add?
No. The chemistry engine is plain code with fixed target ranges and doses per 10,000 gallons. The model only writes the customer-facing summary from the numbers the engine produced.
What happens when a reading is incomplete?
A missing pool id, free chlorine, or pH triggers a Discord alert and an email notice, and nothing is written to the log.
Where do the reports go?
Every accepted test lands in the TestLog tab, the recommended chemicals land in ChemLog, and the customer gets the same numbers by email.
How does the morning route work?
At 07:00 the sweep compares each pool service day with its last test date, posts the due and overdue lists to Discord, and emails the same list.
Additional info
Built with n8n. Need an assessment on your business? Feel free to reach out at https://khmuhtadin.com/consultation/