Templates / IoT sensor monitoring with GPT-4o anomaly detection, MQTT & multi-channel alerts

IoT sensor monitoring with GPT-4o anomaly detection, MQTT & multi-channel alerts

Needs changes

by TOMOMITSU ASANO ✓ · 451 views · created 2025-12-18 · Engineering, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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).

  1. Merge: merges the data from its input branches
  2. Define Sensor Thresholds (Edit Fields (Set)): sets or maps fields
  3. Parse Sensor Payload (Code): runs custom JavaScript code
  4. Generate Data Fingerprint (Crypto): hashes or encrypts values
  5. Remove Duplicate Readings (Remove Duplicates): removes duplicate items
  6. AI Anomaly Detector (AI Agent): runs an AI agent, with model: OpenAI Chat Model
  7. Parse AI Analysis (Code): runs custom JavaScript code
  8. Route by Severity (Switch): routes items into 2 branches
  9. Send Critical Email (Gmail): uses Gmail
  10. Slack: uses Slack

…plus 3 more steps. See the full node list below.

Services it uses

MQTTGmailSlackGoogle SheetsOpenAI Chat Model

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.0Replace 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)

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…

Excerpt from TOMOMITSU ASANO's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.