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.
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.
[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
node-red-contrib-mqtt-broker or use the built-in MQTT out nodedevice_id, timestamp, metric, value fields