Practice Lab 6 – Scheduled flow

In this lab you will create a scheduled flow.

What you will learn

  • How to create a Power Automate scheduled flow and process a list of SharePoint items.

High-level lab steps

  • Create a scheduled flow
  • Query SharePoint list
  • Use data operations
  • Test the flow

Prerequisites

  • Must have completed Lab 3: SharePoint

Detailed steps

Exercise 1 – Create scheduled flow

Task 1.1 - Create the trigger

  1. Navigate to the Power Automate portal https://make.powerautomate.com

  2. Make sure you are in the Dev One environment.

  3. Select the + Create tab from the left navigation menu.

  4. Select Scheduled cloud flow.

  5. Enter Daily New Tasks for Flow name.

  6. Set Repeat every to 1 Day.

    Screenshot of build a scheduled flow.

  7. Select Create.

Task 1.2 - Configure the trigger

  1. Select the Recurrence step.

  2. Select the Recurrence step name and enter Daily

Task 1.3 - Query new tasks

  1. Select the + icon under the trigger step and select Add an action.

  2. Enter list items in search.

  3. Select Get items under SharePoint.

  4. Select Get items step name and enter New tasks

  5. Select the Power Automate SharePoint site.

  6. Select the Tasks list.

  7. Under Advanced parameters, select Show all.

  8. Select the Filter Query field and enter ApprovalStatus eq 'New'

    Screenshot of list items query.

Task 1.4 - Select columns

  1. Select the + icon under the New tasks step and select Add an action.

  2. Enter Select in search.

  3. Select Built-in for Runtime.

  4. Select Select under Data Operation.

  5. Select From field and select the Dynamic content icon.

  6. Select body/value from New tasks.

  7. Select Enter key field and enter Task

  8. Select Enter value field, select the Dynamic content icon.

  9. Select Title from New tasks.

  10. Select Enter key field and enter Description

  11. Select Enter value field, select the Dynamic content icon.

  12. Select Description from New tasks.

  13. Select Enter key field and enter Due

  14. Select Enter value field, select the Dynamic content icon and select See more.

  15. Select Deadline from New tasks.

    Screenshot of Select action.

  16. If the flow designer has automatically added one or more For Each loops, drag the Select step outside of the loops and delete the loop(s).

    Screenshot of flow steps without loops.

Task 1.5 - Create table

  1. Select the + icon under the Select step and select Add an action.

  2. Enter create html in search.

  3. Select Create HTML table under Data Operation.

  4. Select Create HTML table step name and enter Format as HTML table

  5. Select From field and select the Dynamic content icon.

  6. Select Output from Select.

    Screenshot of Format HTML table action.

Task 1.6 - Send email

  1. Select the + icon under the Format as HTML table step and select Add an action.

  2. Enter email in search.

  3. Select Send an email (V2) under Office 365 Outlook.

  4. Select Send an email (V2) step name and enter Notify by email

  5. Select To field and select Enter custom value.

  6. Enter your tenant user id for To.

  7. Select Subject field and enter Daily Tasks

  8. Select Body field and select the Dynamic content icon.

  9. Select Output from Format as HTML table.

  10. Select Save.

Exercise 2 – Test scheduled flow

Task 2.1 - Run scheduled flow manually

  1. Select Test

  2. Select Manually.

  3. Select Test.

  4. Select Run flow.

  5. Select Done.

  6. In the Power Automate portal, select the App launcher in the top left of the browser window and then select Outlook.

    Screenshot of Format HTML table action.