An AI-powered anomaly detection and alerting system for industrial AGV (Automated Guided Vehicles) fleets. The system automatically monitors operational data every hour, detects anomalies and critical situations, and delivers a professional HTML alert report via email — designed as a proof of concept for E80 Group, a world leader in intralogistics automation.
E80 Group designs and installs AGV fleets, LGV systems and automated warehouses for clients such as Barilla, Nestlé and Coca-Cola. Their vehicles operate 24/7 — every unexpected breakdown can cost thousands of euros per minute. This system detects anomalies before they become critical failures, enabling proactive maintenance and reducing downtime.
- Every hour the scenario triggers automatically via Make scheduler
- Reads operational data from all AGVs in Google Sheets
- Aggregates all measurements into a single structured text
- Analyzes the data with OpenAI GPT-4 against predefined thresholds
- Delivers a professional HTML alert email with per-AGV anomaly breakdown
| Tool | Purpose |
|---|---|
| Make | Workflow automation |
| Google Sheets | AGV operational data source |
| OpenAI API (GPT-4o) | AI-powered anomaly analysis |
| Gmail | HTML alert email delivery |
Schedule (Every Hour)
↓
Google Sheets — Search Rows
↓
Tools — Text Aggregator
↓
OpenAI — Generate Completion (GPT-4o)
↓
Gmail — Send HTML Alert
| Metric | Normal Range | Critical Level |
|---|---|---|
| Speed | 1.4 – 2.0 m/s | < 0.5 m/s |
| Battery Temperature | 25 – 45°C | > 65°C |
| Errors/hour | 0 – 1 | > 5 |
| Completed Cycles | 10 – 20/hour | < 5 |
| Load | 500 – 1000 kg | > 1100 kg |
| Timestamp | AGV_ID | Velocita | Temp_Batteria | Carico | Errori | Cicli | Stato |
|---|---|---|---|---|---|---|---|
| 2024-04-01 09:00 | AGV-02 | 0.4 | 58 | 920 | 3 | 8 | ANOMALIA |
| 2024-04-01 10:00 | AGV-02 | 0.2 | 71 | 920 | 7 | 4 | CRITICO |
⚠️ Column names must be simple with no spaces, special characters or symbols. Make cannot correctly read columns namedVelocità (m/s)— useVelocitainstead.
The HTML alert email includes:
- Header — Red (CRITICAL) / Orange (ANOMALY) / Green (OK)
- KPI Cards — Total AGVs monitored, anomalies detected, critical count
- Per-AGV Detail — Problem, probable cause, immediate action
- Priority Actions Box — 3 prioritized interventions
- Automatic footer with timestamp
Analyze this AGV monitoring data and write an analysis in Italian.
NORMAL THRESHOLDS:
- Speed: 1.4-2.0 m/s | CRITICAL if < 0.5
- Battery temperature: 25-45°C | CRITICAL if > 65
- Errors: 0-1 | CRITICAL if > 5
- Cycles: 10-20/hour | CRITICAL if < 5
DATA:
{{text_aggregator}}
For each AGV with anomalies write EXACTLY in this format:
AGV-XX:
• Problem: [brief description with exact values]
• Cause: [probable cause]
• Action: [immediate action required]
If an AGV is normal write:
AGV-XX:
• Status: OK — all parameters within normal range
- Make account
- Google account with Google Sheets
- OpenAI API key
- Gmail account
- Create the Google Sheet with the structure above — tab named
Metriche - Import the blueprint on Make: ⋮ → Import Blueprint → upload
blueprint.json - Connect your accounts: Google Sheets, OpenAI, Gmail
- Update the Google Sheets module with your file and sheet name
- Run once to test → check your inbox
- Activate the scenario toggle for automatic hourly execution
Why is the HTML template in Gmail and not in OpenAI? OpenAI slightly varies HTML output on each call even with the same prompt. By putting the fixed template directly in Gmail and using OpenAI only for the anomaly analysis text, the report layout is guaranteed to be identical every time.
Why simple column names without special characters?
Make cannot correctly read columns with names like Velocità (m/s) or Temperatura (°C). Using simple names like Velocita and Temp_Batteria avoids parsing errors.
Why Text Aggregator? Search Rows returns one bundle per row (12 AGVs = 12 bundles). The Text Aggregator collapses them into a single text that OpenAI receives in one message, preventing 12 separate emails.
| Problem | Cause | Solution |
|---|---|---|
| Empty values in email | Variables not linked after column rename | Re-drag variables from panel in Text Aggregator |
| "Data not available" message | {{2.text}} is empty |
Reselect text variable from OpenAI panel |
| Multiple emails sent | Text Aggregator misconfigured | Verify Source Module = Search Rows |
Unable to parse range |
Sheet name typed manually | Always select from dropdown |
| Layout changes between runs | OpenAI generating HTML | HTML template must be in Gmail, not OpenAI |
To connect the system to real AGV data:
- Replace Google Sheets with the actual AGV operational database (via API or automated export)
- Update thresholds in the OpenAI prompt with real parameters for each AGV model
- Add Slack/Teams alerts in addition to email
- Integrate with maintenance ticketing system for automatic work order creation
MIT — feel free to use, modify and share.
Matteo Daviddi Data Analyst & Process Automation LinkedIn · GitHub