MQTT

Message Brokers integration · 6 node(s) including 1 trigger.

00Overview

Talk to an MQTT broker from a flow — publish messages to a topic, read or clear a topic's retained value, wait for a message to arrive, or publish a request and wait for the reply. The trigger goes the other way: it starts a flow the moment a message lands on a topic you are watching, so a device, sensor or service can kick off automation just by publishing.

Every field below is exactly what you see in the Flomation editor. Fields marked ● live picker let you choose from a list pulled live from your account — no IDs to look up.

01Connecting MQTT

  1. Pick the Protocol your broker speaks: mqtt (plain), mqtts (TLS), or ws / wss for MQTT over WebSockets. Use an encrypted option for anything crossing a network you do not control.
  2. Enter the Broker Host as a bare hostname or IP — no mqtt:// in front of it — and set the Port if it is not the default (1883 plain, 8883 TLS, 8083 WebSocket, 8084 secure WebSocket).
  3. If the broker requires credentials, fill in Username and Password, adding the password as an environment secret (e.g. mqtt_pass). Leave both empty for a broker that allows anonymous clients.
  4. For a broker with a privately-signed certificate, paste its authority into CA Certificate. If the broker also demands a client certificate (mutual TLS), add Client Certificate and Client Key. Allow Insecure TLS turns certificate checking off altogether — keep it for a self-signed test broker and nothing else.
  5. Leave Client ID blank and Flomation picks one for you: the actions get a fresh ID for every run, so they never collide on a shared broker, while the trigger keeps a stable one across reconnects — that is the identity the broker keys the trigger's queued messages to. Set it yourself only if your broker insists on a particular ID — some managed IoT services tie the client ID to the registered device and refuse the connection otherwise.
FieldTypeDetails
ProtocolstringRequiredMQTT (TCP), MQTT over TLS, MQTT over WebSocket, MQTT over Secure WebSocket
PasswordsecretBroker password
CA CertificatesecretPEM-encoded CA cert — only for a privately-signed broker
Client CertificatesecretPEM-encoded client cert — only for mutual-TLS brokers
Client KeysecretPEM-encoded client private key — only for mutual-TLS brokers
Allow Insecure TLSbooleanSkip certificate verification — only for a self-signed broker
Broker HoststringRequiredbroker.example.com — hostname or IP, no scheme
Portinteger1883 (MQTT), 8883 (TLS), 8083 (WebSocket)
UsernamestringLeave empty for an anonymous broker
Client IDstringLeave empty to generate a unique ID per run (recommended)
i
Pick an Environment on your flow (Flow Settings → Environment) so the secret resolves. Secret fields never show the value — they reference ${secrets.your_secret}.

02Message

MQTT: Wait for Message

messagebrokers/mqtt/message_wait · Action

Pause the flow and wait for the next message on a topic, up to a timeout. Use it to wait for a device to report back mid-flow. Check the Received output to branch on whether a message actually arrived.

FieldTypeDetails
WebSocket Pathstring/mqtt
TopicstringRequiredsensors/kitchen/+ — wildcards allowed (+ one level, # the rest)
Delivery Guarantee (QoS)stringchoices: 0 — At most once (fire and forget), 1 — At least once (acknowledged), 2 — Exactly once
Wait For (seconds)integer30 — how long to listen before giving up (maximum 300)
Ignore Retained ValuebooleanTicked (default): wait for a genuinely new message, skipping the topic's stored last value
Parse JSON PayloadbooleanDecode the payload into fields you can reference downstream

Returns: received, topic, payload, payload_json, qos, retained, received_at, result, tool_result, success, error

03Publish

MQTT: Publish Message

messagebrokers/mqtt/publish · Action

Publish a message to a topic on an MQTT broker. Choose the delivery guarantee (QoS) and optionally retain the message so the next subscriber receives it immediately.

FieldTypeDetails
WebSocket Pathstring/mqtt
TopicstringRequiredsensors/kitchen/temperature — wildcards are not allowed when publishing
MessagetextThe payload to publish — plain text or JSON
Delivery Guarantee (QoS)stringchoices: 0 — At most once (fire and forget), 1 — At least once (acknowledged), 2 — Exactly once
RetainbooleanKeep this as the topic's last known value, delivered to every new subscriber

Returns: topic, result, tool_result, success, error

04Request

MQTT: Publish and Await Reply

messagebrokers/mqtt/request_reply · Action

Publish a request to one topic and wait for the answer on a reply topic — ask a device a question and get its response in a single step. Check the Replied output to branch on whether an answer came back.

FieldTypeDetails
WebSocket Pathstring/mqtt
Request TopicstringRequireddevices/boiler/command — where to send the request
Request MessagetextThe payload to send — plain text or JSON
Reply TopicstringRequireddevices/boiler/status — where the answer will arrive (wildcards allowed)
Delivery Guarantee (QoS)stringchoices: 0 — At most once (fire and forget), 1 — At least once (acknowledged), 2 — Exactly once
Wait For Reply (seconds)integer30 — how long to wait for the answer before giving up (maximum 300)
Parse JSON ReplybooleanDecode the reply into fields you can reference downstream

Returns: replied, topic, payload, payload_json, qos, retained, received_at, request_topic, result, tool_result, success, error

05Retained

MQTT: Clear Retained Value

messagebrokers/mqtt/retained_clear · Action

Delete a topic's stored last known value, so new subscribers no longer receive a stale reading. Live messages on the topic are unaffected.

FieldTypeDetails
WebSocket Pathstring/mqtt
TopicstringRequiredsensors/kitchen/temperature — the topic whose stored value to clear

Returns: topic, result, tool_result, success, error

MQTT: Get Retained Value

messagebrokers/mqtt/retained_get · Action

Read a topic's last known value — the message the broker has retained. Use it to ask 'what is the current temperature?' without waiting for the next reading. Check the Found output to branch on whether the topic has a stored value.

FieldTypeDetails
WebSocket Pathstring/mqtt
TopicstringRequiredsensors/kitchen/temperature — the topic whose stored value you want
Parse JSON PayloadbooleanDecode the payload into fields you can reference downstream

Returns: found, topic, payload, payload_json, qos, retained, received_at, result, tool_result, success, error

06Triggers

i
The MQTT trigger holds a live subscription to your broker, so there is no URL to paste anywhere — save the flow and Flomation connects and subscribes for you. List the topics you want in Topics, separating several with commas; wildcards such as sensors/# are allowed, and you can raise one topic's delivery guarantee by adding :1 or :2 after it. Leave Queue Messages While Disconnected ticked and the broker holds on to QoS 1 and 2 messages for this flow if the connection drops, replaying them once it is back — untick it and anything published while the trigger was away is simply missed. Tick Parse JSON Payload to have the message decoded into fields you can reference in later nodes. Edit the trigger's settings and Flomation re-dials the broker with the new configuration on its own.

MQTT Trigger

trigger/mqtt · Trigger

Start a flow whenever a message arrives on an MQTT topic. Flomation holds a subscription open to your broker and runs the flow the moment a message is published. Wildcards are supported: + matches one level, # matches the rest.

FieldTypeDetails
WebSocket Pathstring/mqtt
TopicsstringRequiredsensors/# — separate several with commas; add :1 or :2 after a topic to raise its delivery guarantee
Delivery Guarantee (QoS)stringApplies to every topic that doesn't set its own — choices: 0 — At most once (fire and forget), 1 — At least once (acknowledged), 2 — Exactly once
Parse JSON PayloadbooleanDecode the payload into fields you can reference downstream
Queue Messages While DisconnectedbooleanTicked (default): the broker holds QoS 1 and 2 messages for this flow if the connection drops, and delivers them on reconnect

Returns: content, topic, payload, payload_json, qos, retained, received_at, broker

07Notes & Limitations

Behaviours and constraints worth knowing before you build with these nodes.