Send email notification for important messages received on Cisco Spark

Flow description

This flow sends an email to your email address whenever someone sends any message to any or a particular room in Cisco Spark containing the word ‘important’ (or any other word you want).


Triggers and actions

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


Trigger: Cisco Spark - New Message

Action 2: Filter (Contains)

Action 3: Notification - Send an Email


What you need:

- 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

    We want to a create a flow such that it triggers whenever a new message (containing the word ‘important’) is sent to a specific room in Cisco Spark. So, for this, we will set up ‘Cisco Spark - New Message’ trigger. 


    Step 2.1. Select trigger app - Cisco Spark

    From the list of app displayed in the ‘Select a trigger app’ screen, select Cisco Spark


    Step 2.2. Select trigger event - New Message

    As soon as you select ‘Cisco Spark’, the next page will display the list of all the events of Cisco Spark that you can use as trigger for this flow. From the list, choose the ‘New Message’ event, since we want the flow to run when a new message is received. 


    Step 2.3. Connect to your account

    The ‘Connect’ step requires you to connect Built.io Flow to your Cisco Spark account. To do this, click the '+ Add an account' 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.


    Step 2.4. Configure ‘Cisco Spark - New Message’ trigger

    Once you connect Cisco Spark to Built.io Flow Express, you will go to the ‘Configure’ page. Enter data in the fields as per the instructions given below:

    Webhook Name: Enter any name of your choice for the webhook. By default, the name is set as ‘Built.io Flow Trigger’. 

    If you want the flow to trigger whenever a message is received in any of the Cisco Spark room that you have access to, then keep all other fields unchanged. Click Next to go to the next step. However, if you wish to trigger the flow when a message is received in a specific room, enter the room ID in the ‘Room ID’ field. 

    Room ID (optional): Specify the room ID if you wish to set the trigger for a specific room. To enter room ID, click the dropdown button at the right-hand side of the field. Then, select ‘Use data from Cisco Spark’ account. Here, you will see the list of all the rooms that you have access to in your Cisco Spark account. Select the one for which you wish to set the trigger.

    2.4.png

    Person Email (optional): Enter the email ID of the person if you wish to trigger this flow only if the message is sent by a specific user. 

    Has Files (optional): Select if you wish to trigger this flow only if the message has (or does not have) a file attached with it. 

    Once you have entered all the details, click ‘Next’.


    Step 2.5. Set filter

    The ‘Filters’ page allows you to set conditional logic inside your flow. This is where you will set the condition that the flow should be triggered only if the incoming message in Cisco Spark contains the word ‘important’ (or any other word of your choice). To achieve this, click the ‘Add Filter’ link. 

    Input: Click the dropdown link and click on ‘Trigger Data’. This will display the list of all the elements/keys the incoming Spark message such as Message ID, Room ID, Room Type, and Message. Since we want to check if the message content has the word ‘important’, select the ‘Message’ property.

    2.5.1.png

    Condition: From the list of options under this field, select ‘Contains’.

    2.5.2.png

    Expected: Here, you need to enter the word that should be present in the message. In our case, it should be ‘important’.

    By setting this condition, we have asked the flow to check if the new incoming message in a room in Cisco Spark contains the word ‘important’. The flow will proceed to the next action only if this condition is met. 

    Click ‘Next’ to proceed. With this step, we are done with setting up the trigger. Now it’s time to add an action. 

  • Step 3. Add action - Send an Email

    Since we want to send the message content to an email address, we will set up the required action for this. 


    Step 3.1. Select app

    After setting up the trigger, click the ‘Add Action’ link. From the list of apps that appear, select ‘Notification’. Optionally, you can also use ‘Gmail’ to send an email.


    Step 3.2. Select action 

    Under ‘Notifications’, select the ‘Send an Email’ action. This action lets you send an email to the specified recipient. 


    Step 3.3. Configure action

    This action contains almost all the fields that you usually get while create an email. Enter values in the fields as per the instructions given below:

    To: Enter the email address of the recipient. 

    Subject: This could be anything of your choice. For example, ‘New important message in Cisco Spark’.

    Body: Since we want the content of the message in the body of the email, we will use the output of the previous action as input for this field. To do this, click the dropdown button, and click on ‘Trigger Data’. Then, select the ‘Message’ key from the list. 

    If you wish to include the name or email address of the person sending the message, you also need to select the ‘Person email’ key from the list. 

    3.3.png

    Click ‘Next’ to save and complete this step.

  • Step 4. Save flow

    Once you set up the ‘Send an Email’ 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.

  • Step 5. Test Flow

    The ‘Test Flow’ link allows you to test of your flow has been configured properly. When you click this link, the flow sends dummy trigger data to the configured actions. It does not send actual data. If the flow runs properly, it means the flow has been configured without any errors, and is ready for use. 

    Now whenever a new message (containing the word ‘important’) will be received in a room in Cisco Spark, the flow will send a notification to the specified email address. 

  • Import from library

    While you can create this flow from scratch by following the above steps, you can also directly import a preconfigured template of this flow from our library:

    IMPORT