# Send notification from workflow to mobile app (using MQTT)

**URL:** <https://forums.losant.com/t/send-notification-from-workflow-to-mobile-app-using-mqtt/3255>\
**Category:** Help\
**Tags:** mqtt, workflow\
**Created:** [September 13, 2020, 9:51pm UTC](https://forums.losant.com/t/send-notification-from-workflow-to-mobile-app-using-mqtt/3255 "2020-09-13T21:51:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anselm\_Burger](https://avatars.discourse-cdn.com/v4/letter/a/cab0a1/32.png) [@Anselm\_Burger](https://forums.losant.com/u/Anselm_Burger)\
**Post date:** [September 13, 2020, 9:51pm UTC](https://forums.losant.com/t/send-notification-from-workflow-to-mobile-app-using-mqtt/3255/1 "2020-09-13T21:51:31Z")

</div>

A device reports its temperature to Losant. Our users have a smartphone app that displays a plot of the temperature curve.  
Additionally, a workflow is triggered and checks if the temperature of the device is still within an acceptable range. If this is not the case, the smartphone app should immediately display a warning message.  
Of course I do not want the app to permanently poll Losant to check its temperature. Instead, I want Losant to notify my app about this event.  
How can this be done? My aproach is to have the app subcribe to the Losant MQTT broker and check for a specific topic. The workflow would post a message to this topic, which the client (my app) received immediately and displayed a warning.  
So I set up the following test workflow:  
 ![1-workflow-send](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/1/131fd21828e5cfc2f2249f2ad967b358f49894ba.png)  
The configuration of the MQTT node:  
 ![2-workflow-message](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/457e478f20aea500c5c8d1cf6c0c8c0ddada0d00.png)

This is the reception string for the MQTT subscriber:  
“C:\Program Files\mosquitto\mosquitto\_sub” -h [broker.losant.com](http://broker.losant.com) -p 1883 -i DEVICE\_ID -u APP\_ACCESS\_KEY -P APP\_ACCESS\_SECRET -V mqttv311 -v -t DEVICE\_ID/#

So I am subscribing to all topics published for that device. Indeed, sometimes I receive the published message. But very unreliablely, maybe one in ten times.

What is going on? Why don’t I get all of these MQTT messages?  
And, more generally speaking, is this a proper way of doing what I want?

Many thanks!

---

<div class="post-metadata">

**Author:** ![anaptfox](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/anaptfox/32/873_2.png) [@anaptfox](https://forums.losant.com/u/anaptfox)\
**Post date:** [September 14, 2020, 3:01pm UTC](https://forums.losant.com/t/send-notification-from-workflow-to-mobile-app-using-mqtt/3255/3 "2020-09-14T15:01:13Z")

</div>

@Anselm_Burger ,

It looks like the topic you have is blurred out. I think that maybe related to the issue. Could you post what you have there?
