In this project we will send a Text Messages depending on the current temprature on a location (postal code). Therefore we are using the Apps from OpenWeatherMap and the Text Messages Service from AddComm.
The Flow will automatically start when the data is received. The data fields for this Flow we need are:
Decision: Has Mobile?
It is possible that there is no mobilenumber available in the data. Therefore, the first Decision checks if the field
@data.client.mobile@ is not empty. In this case we used is not empty to make it possible to proceed the Flow with a YES.
OpenWeatherMap provides an userfriendly API with the possibilities to retreive the current weather information off a Postal/ZIP code in various countries. This App is available in the platform’s MarketPlace.
The App requires to fill in a Postal/ZIP code and a Country. In this case we are used a variable (
@data.client.postalcode@), you can also fill in a fixed postal/zipcode. (for example: the postcalcode of your own location or store)
The App is configured to not save all the incoming data, the following data is saved into the Data Schema:
main.tempis saved on
main.temp_minis saved on
main.temp_maxis saved on
Decision: 16 degrees or more
Within this Decision we can use the incoming data witch are saved into the Data Schema.
In this case we are deciding if the temprature is greater or equal to 16 degrees:
greater or equal then
As you know, the Decision can have an outcome of YES or NO
Send SMS (YES and NO)
After the previos Decision you can basically put any next action you preffer. We used sending a Text Message (SMS) with a certain text depending on the Outcome of the Decision.
The Send SMS App is already configured with the required username and password. In the Flow you only have to fill in the To, Message and Sender. We know there is a mobile number because the Decision: Has Mobile? had already determined that, so we are using that same variable
@data.client.mobile@ as the To. The body of the SMS is the Message within the body you can also use a variable, in this case
@data.client.name@. This App allows you to fill in a phonenumber or a name into the Sender field.
There are two Send SMS Apps wihtin this Flow because of the Decision and the diffent Messages of the SMS.
The Flow can End in to ways, once there is no Mobile Number available and once the Receiver received either one of the Text Messages.