Analyze machine downtime and OEE with Google Sheets, OpenAI and WhatsApp
Needs changesWhat this workflow does
This AI workflow has 30 nodes and runs when someone submits an n8n form (“Shift Production & Downtime Log”) (plus 2 other triggers). Along the way it connects Google Sheets, WhatsApp Business Cloud and OpenAI Chat Model.
How it runs
Trigger: When someone submits an n8n form (“Shift Production & Downtime Log”) (plus 2 other triggers).
- Normalize & Validate Entries (Code): runs custom JavaScript code
- Identify Completed Shift (Code): runs custom JavaScript code
- Upsert Shift Log Sheet (Google Sheets): append or update
- Read Machine Master (Google Sheets): uses Google Sheets
- Read Shift Log (Google Sheets): uses Google Sheets
- Calculate OEE & Six Big Losses (Code): runs custom JavaScript code
- Shift Data Found? (If): checks a condition and branches into true / false
- AI Root-Cause Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 2 tools (OEE History, Maintenance Tickets); output parser: Parse Structured RCA
- Alert Plant Head: Missing Shift Log (WhatsApp Business Cloud): send
- Compose Report & Pareto Chart (Code): runs custom JavaScript code
…plus 13 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other WhatsApp + Google Sheets templates (119) · Other WhatsApp + OpenAI templates (104)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Root-Cause Agent (v1.7): 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).
Published 2026 — 6% of 2026 templates need changes for 3.0. See how template age affects 3.0 readiness →
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Root-Cause Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- n8n Form Trigger
n8n-nodes-base.formTrigger - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - Schedule Trigger
n8n-nodes-base.scheduleTrigger - If
n8n-nodes-base.if - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches
From the author
Quick overview This workflow captures per-shift machine production and downtime data via an n8n Form or an authenticated webhook, calculates OEE and TPM Six Big Losses from Google Sheets data, uses OpenAI for structured root-cause analysis, then sends a…