Send current temperature of a city to a Cisco Spark room every morning

Flow description

This flow fetches the current weather and temperature report of the specified city, and sends it to a room in Cisco Spark every morning at the specified time.  


Triggers and actions 

You will need to set up the following trigger and actions for creating this flow:

Trigger: Clock 

Action 1: Weather Underground - Get Weather Condition

Action 2: Cisco Spark - Post New Message


What you need:

- Weather Underground account

- Cisco Spark account


Let’s look at the steps involved in creating this flow.

  • Step 1. Add a flow

    Sign in to your Built.io Flow Express account. Then, hover on the ‘+ Add Flow’ card that you see on the dashboard, and select ‘+ Blank Flow’. This will take you to the trigger page, where you need to set up a trigger for your flow.

  • Step 2. Set up trigger

    Since we want the flow to be triggered at a specified time every morning, we will use the ‘Clock’ trigger. Read more about it here.


    Step 2.1. Select trigger app - Clock

    To set the ‘Clock’ trigger, select the ‘Clock’ icon from the list of services/apps visible on the ‘Select a Trigger App’ page. 

    2.1.png

    Step 2.2. Select trigger event - Repeat From

    When you click on the ‘Clock’ icon, it will take you to the list of events that you can set as trigger. Since we want the flow to trigger every morning starting from the next day, we will select the ‘Repeat From’ event. The ‘Repeat From’ option lets you set a trigger that keeps repeating at regular intervals, starting from the specified date and time. 

    2.2.png

    Step 2.3. Configure trigger 

    On the configuration page, you will see a number of fields that you need to fill. 

    Date: Specify the date from when the trigger should start repeating. Date format should be YYYY-MM-DD.

    Time: Specify the time when the trigger should start repeating. Time format should be HH:MM. 

    Timezone: Enter the timezone of your region. 

    Runs on every: Specify an interval for the trigger. For instance, if you select ‘1 hour’ the flow will be triggered every hour starting from the date and time specified above. For this case, we will select ‘1 Day’. 

    2.3.png

    Click ‘Next’. With this step, the ‘Clock’ trigger has been set. Now, it’s time to add actions for your flow.

  • Step 3. Select first action

    The first action that you need to add to your flow is ‘Weather Underground - Get Weather Condition’. Let’s look at the steps involved in setting this up. 


    Step 3.1. Select an app - Weather Underground

    Once you set up a trigger, the flow will prompt you to add an action. Click the 'Add Action' button to add an action. 

    The next page will display all the apps that you can use in your flow. Find and select Weather Underground from the list.


    Step 3.2. Select an action - Get Weather Condition

    The ‘Select an Action’ page displays the list of all the actions of Weather Underground that you can use in your flow. Select ‘Get Weather Condition’. This action lets you get the current weather condition of a given city. 

    3.2.png

    Step 3.3. Connect to your Weather Underground account

    The ‘Connect’ step requires you to connect Built.io Flow to your Weather Underground account. To do this, click the 'Add an account' button and enter the API key of your Weather Underground account. If you have already added an account, select the required one from the list. 

    3.3.png

    Step 3.4. Configure Get Weather Condition action

    On the configuration page, you need to specify the details of the city for which you wish to get the weather condition. 

    State: Enter the name of the state. For example, Arizona.

    City: Enter the name of the city of which you wish to get the weather condition. For example, Phoenix. 

    3.4.png

    Once you have entered these details, click ‘Next’. This will take you to the ‘Flow Settings’ page, where you can add/edit the title, tags, and description of the flow. You can also add an action from here. Since we want the flow to perform more tasks, click the ‘Add Action’ link. 

  • Step 4. Select another action

    Since we want to send the weather condition of a city to a particular room in Cisco Spark, we will add the ‘Cisco Spark - Post New Message’ action to the flow. 


    Step 4.1. Select an app - Cisco Spark

    Click on the ‘+ Add Action’ link. This will display the list of apps that you can use for the next action. Select ‘Cisco Spark’ from the list. 

    4.1.png

    Step 4.2. Select action - Post New Message

    The ‘Select an Action’ page displays the list of all the actions of Cisco Spark that you can use in your flow. Select ‘Post New Message’. This action lets you send a new message to a particular room in your Cisco Spark account.


    Step 4.3. Connect to your Cisco Spark account

    The ‘Connect’ step requires you to connect Built.io Flow to your Cisco Spark account. To do this, click the (image 3.3.1) button and log in to your Cisco Spark account in the new window that appears. If you have already added an account, select the required one from the list. 

    4.3.png

    Step 4.4. Configure the Post New Message action

    On the configuration page, enter the details for the action as per the instruction given below:

    Room ID: Click on this field to get the list of all the rooms available in your Cisco Spark account. From this list, select the room to which you wish to send the weather condition of the specified city. 

    Message Type: Select the type of message you wish to send. Available options are ‘Text’ and ‘Markdown’. In this case, we will use the default option, i.e., ‘Text’.

    Message: In this field, you need to specify the data that you need to send to the specified room. Since we want the weather condition of the city to go in the body, we will use the output of the previous action here. To do this, click on this field. Then, select the ‘Weather Underground - Get Weather Condition’ option. This will display the list of all the elements that you can use. From this list, select ‘Temperature Celsius’ or ‘Temperature Fahrenheit’ to get the temperature of the city. We can also add custom text in the body. For example, ‘The current temperature of Chicago is {Temperature Celsius}’. 

    Once this is done, click ‘Next’. 

  • Step 5. Save flow

    Once you set up the ‘Cisco Spark - Get Weather Condition’ action, you will be redirected to the Flow Settings page, where you can add title, tags, and description for the flow. You can also add an action or save your flow from here. 

    Click the ‘Save Flow’ link to save your flow. 

    With this step, the required flow has been successfully set up. Now, every morning at the specified time, this flow will be triggered, which will first fetch the current temperature of the given city, and then it will send the temperature to the specified room in your Cisco Spark account. 

    5.png