Create a flow
-
Sign into Microsoft Flow:
-
Select the My flows tab, and then create a flow from a blank:
-
Enter "schedule" into the search box to search for all services and triggers that are related to scheduling.
-
Select the Schedule - Recurrence trigger to indicate that your flow will run on a schedule that you'll provide next:
-
Set the schedule to run every 15 minutes:
-
Select + New step, Add an action, and then type outlook into the search box to search for all actions related to Microsoft Outlook.
-
Select the Office 365 Outlook - Get emails action:
-
This will open the Get emails card. Configure the Get emails card to select the top 10 unread emails from the Inbox folder. Don't include attachments because they won't be used in the flow:
Note
So far, you've created a simple flow that gets some emails from your inbox. These emails will be returned in an array; the Apply to each action requires an array, so this is exactly what's needed.
Add actions and conditions
-
Select + New step, More, and then Add an apply to each action:
-
Insert the Body token into the Select an output from previous steps box on the Apply to each card. This pulls in the body of the emails to be used in the Apply to each action:
-
Select Add a condition:
-
Configure the Condition card to search the subject of each email for the words "meet now":
-
Insert the Subject token into the Object Name box.
-
Select contains in the Relationship list.
-
Enter meet now into the Value box.
-
-
Select More, and then select Add a condition from the IF YES, DO NOTHING branch. This opens the Condition 2 card; configure that card like this:
-
Insert the Importance token into the Object Name box.
-
Select is equal to in the Relationship list.
-
Enter High into the Value box.
-
-
Select Add an action under the IF YES, DO NOTHING section. This will open the Choose an action card, where you'll define what should happen if the search condition (the meet now email was sent with high importance) is true:
-
Search for notification, and then select the Notifications - Send me a mobile notification action:
-
On the Send me a mobile notification card, provide the details for the push notification that will be sent if the subject of an email contains "meet now", and then select Add an action:
-
Enter read as the search term, and then select the Office 365 Outlook - Mark as read action. This will mark each email as read after the push notification is sent:
-
Add the Message Id token to the Message Id box of the Mark as read card. You may need to select See more to find the Message Id token. This indicates the Id of the message that will be marked as read:
-
Going back to the Condition 2 card, on the IF NO, DO NOTHING branch:
-
Select Add an action, and then type get manager into the search box.
-
Select the Office 365 Users - Get manager action from the search results list.
-
Enter your full email address into the User box of the Get Manager card.
-
-
Select More, and then select Add a condition from the IF NO branch. This opens the Condition 3 card; configure the card to check if the email sender's email address (the From token) is the same as your boss' email address (the Email token):
-
Insert the From token into the Object Name box.
-
Select contains in the Relationship list.
-
Enter Email token into the Value box.
-
-
Select Add an action under the IF YES, DO NOTHING section of the Condition 3 card. This will open the IF YES card, where you'll define what should happen if the search condition (the email was sent from your boss) is true:
-
Search for notification, and then select the Notifications - Send me a mobile notification action:
-
On the Send me a mobile notification 2 card, provide the details for the push notification that will be sent if the email is from your boss, and then select Add an action:
-
Add the Office 365 Outlook - Mark as read action. This will mark each email as read after the push notification is sent:
-
Add the Message Id token to the Mark as read 2 card. You may need to select See more to find the Message Id token. This indicates the Id of the message that will be marked as read:
-
Name your flow, and then create it:
If you followed along, your flow should look similar to this diagram:
Run the flow
-
Send yourself a high-importance email that includes meet now in the subject (or have someone in your organization send you such an email).
-
Confirm the email is in your inbox and it's unread.
-
Sign into Microsoft Flow, select My flows, and then select Run now:
-
Select Run flow to confirm you really want to run the flow:
-
After a few moments you should see the results of the successful run:
View results of the run
Now that you've run the flow successfully, you should receive the push notification on your mobile device.
-
Open the Microsoft Flow app on your mobile device, and then select the Activity tab. You'll see the push notification about the meeting:
-
To see the full contents of the notification, you may have to select the notification. You'll see the full notification, similar to this:
Note
If you don't receive the push notification, confirm that your mobile device has a working data connection.