IoT sensor monitoring with GPT-4o anomaly detection, MQTT & multi-channel alerts
Needs changesWhat this workflow does
This AI workflow has 16 nodes and runs on MQTT events (plus 1 other trigger). Along the way it connects MQTT, Gmail, Slack and Google Sheets and 1 more.
How it runs
Trigger: On MQTT events (plus 1 other trigger).
- Merge: merges the data from its input branches
- Define Sensor Thresholds (Edit Fields (Set)): sets or maps fields
- Parse Sensor Payload (Code): runs custom JavaScript code
- Generate Data Fingerprint (Crypto): hashes or encrypts values
- Remove Duplicate Readings (Remove Duplicates): removes duplicate items
- AI Anomaly Detector (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Parse AI Analysis (Code): runs custom JavaScript code
- Route by Severity (Switch): routes items into 2 branches
- Send Critical Email (Gmail): uses Gmail
- Slack: uses Slack
…plus 3 more steps. See the full node list below.
Services it uses
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 Anomaly Detector (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).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Anomaly Detector (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- MQTT Trigger
n8n-nodes-base.mqttTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Crypto
n8n-nodes-base.crypto - Remove Duplicates
n8n-nodes-base.removeDuplicates - AI Agent
@n8n/n8n-nodes-langchain.agent - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Slack
n8n-nodes-base.slack - Google Sheets
n8n-nodes-base.googleSheets - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
{ "name": "IoT Sensor Data Aggregation with AI-Powered Anomaly Detection", "nodes": { "parameters": { "content": " How it works\nThis workflow monitors IoT sensors in real-time. It ingests data via MQTT or a schedule, normalizes the format, and removes…