What is the primary function of the MQTT node in n8n?
The MQTT node allows n8n to connect to an MQTT broker, enabling seamless Integrations with IoT devices and messaging systems. It can be configured both to publish messages or to subscribe to topics to receive data.
How do I start a workflow automatically using MQTT messages?
You must configure the MQTT node in its trigger mode. When a message is published to the specific topic you are subscribing to, the workflow automatically starts, making it an effective real-time trigger.
Can I send data from an n8n workflow out to an MQTT broker?
Yes, you use the MQTT node in action mode (Publish) anywhere within your workflow. This allows you to process data from previous nodes and publish the results to a designated MQTT topic.
What authentication methods does the MQTT node support for broker connections?
The node supports standard MQTT authentication methods, including basic username and password credentials, allowing secure Integrations with both public and private brokers.
How does the MQTT trigger node handle message payloads?
The MQTT trigger node receives the message payload (usually JSON or string data) and automatically passes it as structured input data to the next node in the workflow for further processing.