File water well completion permits with OpenAI, state APIs, Google Drive and Gmail
Needs changesWhat this workflow does
This AI workflow has 18 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects HTTP Request, OpenAI Chat Model, Google Drive and Gmail. It also calls state-water-board.example.gov over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Normalize Completion Report (Edit Fields (Set)): sets or maps fields
- Research State Grouting Requirements (AI Agent): runs an AI agent, with model: Agent Model; 1 tool (State Grout Minimum Lookup Tool)
- Check Grouting & Setback Compliance (Code): runs custom JavaScript code
- License Valid & Setbacks Met? (If): checks a condition and branches into true / false
- 48-Hour Grout Cure Confirmation Hold (Wait): waits 48 hours
- Tag Non-Compliant (Edit Fields (Set)): sets or maps fields
- Fetch Post-Cure Inspection Reading (HTTP Request): calls an HTTP API (GET)
- Shape Filing Record (Edit Fields (Set)): sets or maps fields
- Verify Post-Cure Grout Level (Code): runs custom JavaScript code
- File Completion Report with State Portal (HTTP Request): calls state-water-board.example.gov (POST)
…plus 5 more steps. See the full node list below.
Services it uses
HTTP calls to: state-water-board.example.gov
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- HTTP Request Tool (legacy) in State Grout Minimum Lookup Tool: replace with HTTP Request node connected to the AI Agent's Tool input.
- AI Agent v1 (old agent modes) in Research State Grouting Requirements (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| HTTP Request Tool (legacy) State Grout Minimum Lookup Tool | HTTP Request node connected to the AI Agent's Tool input |
| AI Agent v1 (old agent modes) Research State Grouting Requirements (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest - Google Drive
n8n-nodes-base.googleDrive - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow automates regulatory well compliance by integrating data ingestion, AI-driven validation, and state filing. It uses an OpenAI agent to check Water Board APIs, validates construction measurements, manages the 48-hour cure delay,…