Publish MQTT Message Action

Publish message to MQTT Broker completely serverless via Thingsup IoT Platform.

This provides a way to publish message to MQTT Broker. Before adding Publish MQTT Message Action, user has to define a MQTT Connection. User need to provide following parameters to publish message to MQTT Broker.


  • User need to provide MQTT Topic on which data will be published.


MQTT QoS value. Default is 1.


  • Javascript code to build mqtt message.

  • "topic","message" and "payload" objects are available in this code, function can be used to set message body and topic from payload before sending to MQTT.

  • Setting topic here overrides already defined PublishTopic.

//Example 1

message = payload;
topic = "somenewtopic";

Connection ID

User need to provide a Connection ID of MQTT connection.

Please note the following points:

  • "payload" object is supplied from Action Trigger like Rules, Action Command etc.

Last updated