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 + Create 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 trigger.

  2. Select the Recurrence trigger name and enter Daily

[!NOTE] If you encounter an issue editing the trigger name, use Copilot to rename it.
Select Copilot, and in the Copilot chat enter the following prompt: Rename the trigger to Daily.

Task 1.3 - Query new tasks

  1. Select the + icon under the trigger to add an action.

  2. Enter list items in the search box.

  3. Select Get items under SharePoint.

  4. Select Get items action name and enter New tasks

  5. Select or enter the Power Automate SharePoint site URL for Site Address.

  6. Select Tasks for List Name.

  7. Next to 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 to add an action.

  2. Enter Select in the search box.

  3. Select Built-in.

    Screenshot searching for Select action.

  4. Select Select under Data Operation.

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

  6. Select body/value under New tasks.

  7. Select the Enter key field and enter Task

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

  9. Select Title from New tasks.

  10. Select the Enter key field and enter Description

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

  12. Select Description from New tasks.

  13. Select the Enter key field and enter Due

  14. Select the Enter value field, select the Dynamic content icon, and then 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 action 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 action to add an action.

  2. Enter create html in the search box.

  3. Select Built-in.

  4. Select Create HTML table under Data Operation.

  5. Select Create HTML table action name and enter Format as HTML table

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

  7. 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 action to add an action.

  2. Enter email in the search box.

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

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

  5. Select the To field and enter MOD Administrator.

  6. Select your tenant user email for To.

  7. Select the Subject field and enter Daily Tasks

  8. Select the 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.