Score QSR health inspections and send Gmail compliance digests with OpenAI
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on a schedule (every day at 07:00). Along the way it connects Google Sheets, Gmail and OpenAI Chat Model.
How it runs
Trigger: On a schedule (every day at 07:00).
- Fetch Inspection Batch (Edit Fields (Set)): sets 1 field: records
- Split Out: splits a list into separate items
- Shape Inspection Record (Edit Fields (Set)): sets 5 fields: location_id, location_name, region…
- Loop Over Location Records (Loop Over Items (Split in Batches)): loops over the items in batches
- Compute Regional Risk Score (Code): runs custom JavaScript code
- Extract Violation Severity (Information Extractor): extracts structured fields from text with AI, with model: Run Severity Extraction Model
- Append Summary Row (Google Sheets): append
- Compute Corrective Deadline (Code): runs custom JavaScript code
- Check Escalation Threshold (If): checks a condition and branches into true / false
- Append Compliance Log Row (Google Sheets): append
…plus 4 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (11)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Split Out
n8n-nodes-base.splitOut - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Merge
n8n-nodes-base.merge - Information Extractor
@n8n/n8n-nodes-langchain.informationExtractor - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Quick overview This workflow runs daily to process multi-location QSR health inspection notes, uses OpenAI to extract violation severity and corrective actions, logs per-location and batch summaries to Google Sheets, and sends Gmail digest and conditional…