Icon for n8nIcon for Node-RED

n8n + Node-RED: edge-to-business workflow stack

ComplementsCurated

Node-RED and n8n are frequently deployed together in industrial and IIoT environments, each handling the layer it is best suited for. Node-RED runs close to the hardware — on Raspberry Pi, industrial PCs, or edge gateways — translating device protocols and publishing normalized events. n8n runs upstream, consuming those events and applying business logic, database writes, AI enrichment, and notifications.

Complementary roles

  • Node-RED — OPC-UA/Modbus/PROFINET device polling, protocol normalization, MQTT publishing, low-latency edge logic, runs on constrained hardware (256 MB RAM)
  • n8n — MQTT subscriber, business rule evaluation, ERP/CRM integration, AI agent orchestration, report generation, scheduled batch jobs, audit logging

The boundary between them is typically an MQTT broker (e.g., Mosquitto or EMQX). Node-RED publishes structured messages to MQTT topics; n8n subscribes to those topics via its MQTT Trigger node and routes them onward.

Use cases

  • OEE data pipeline — Node-RED polls PLCs for machine state → publishes to MQTT → n8n writes to PostgreSQL/InfluxDB + updates ERP production order status
  • Quality alert routing — Node-RED detects out-of-tolerance sensor reading → n8n creates Jira ticket, notifies quality team via Slack, and logs to compliance database
  • Predictive maintenance — Node-RED streams vibration/temperature readings → n8n batches and forwards to ML inference API → stores predictions in database
  • Shift handover automation — n8n scheduled workflow polls Node-RED data → generates PDF shift report → emails to plant manager

Architecture

[PLC / Sensor]
      |
  OPC-UA / Modbus
      |
  [Node-RED]  ← runs on edge gateway
      |
    MQTT
      |
 [Mosquitto broker]
      |
    MQTT Trigger
      |
    [n8n]  ← runs on server/cloud
      |
  REST / DB / Email / AI

Configuration notes

  1. In Node-RED: install node-red-contrib-mqtt-broker or use the built-in MQTT out node
  2. Structure payloads as JSON with device_id, timestamp, metric, value fields
  3. In n8n: add MQTT Trigger node, configure broker host/port/topic, set QoS
  4. Use n8n's Set node or Code node to transform and route the incoming payload

Tradeoffs

  • Node-RED has a larger library of hardware-specific nodes (OPC-UA, Modbus, S7, BACnet); n8n has none of these natively
  • n8n has far richer business application integrations (500+ SaaS connectors) vs Node-RED's limited set
  • Running both adds operational overhead — two platforms to monitor, update, and secure
  • For simple pipelines that stay within the OT layer, Node-RED alone is sufficient; n8n adds value when workflows touch IT systems