Practice Lab 4 – Approval flow

In this lab you will create an approval flow.

What you will learn

  • How to create a Power Automate approvals cloud flow

High-level lab steps

  • Create an automated cloud flow for the SharePoint list
  • Create an approval
  • Add condition for approval outcome
  • Test the flow

Prerequisites

  • Must have completed Lab 3: SharePoint

Detailed steps

Exercise 1 – Create approval 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 pane.

  4. Select Automated cloud flow.

  5. Enter Task approval for Flow name.

  6. Enter SharePoint in Search all triggers box.

  7. Select When an item is created.

  8. Select Create.

Task 1.2 - Configure the trigger

  1. Select the When an item is created action.

  2. Select the When an item is created action name and enter New task.

[!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 New task.

  1. Select the Power Automate SharePoint site created in the previous lab. If the site is not listed, select Enter custom value and paste the URL of the Power Automate SharePoint site

  2. Select the Tasks list.

    Screenshot of SharePoint trigger.

Task 1.3 - Add approval action

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

  2. Enter approval in the search box.

    Screenshot of approvals search.

  3. Select Start and wait for an approval under Standard approvals.

  4. Select Create New.

  5. Select Approve/Reject - First to respond for Approval Type

  6. Select Start and wait for an approval action name and enter Approval

  7. Enter / into the Title field and select Insert dynamic content.

  8. Select Title under New Task.

    Screenshot of dynamic content for SharePoint item.

  9. Enter your tenant user id for Assigned To.

  10. Enter / into the Details field and select Insert dynamic content.

  11. Select Description.

  12. Enter / into the Item Link field and select Insert dynamic content.

  13. Select See More, and then select Link to item.

    Screenshot of Approval action step.

Task 1.4 - Add condition

  1. Select the + icon under the Start and wait for an approval action to add an action.

  2. Enter condition in the search box.

  3. Select Condition under Control.

  4. Enter / into the left Choose a value field and select Insert dynamic content.

    Screenshot of dynamic content for a condition.

  5. Select Outcome.

  6. Select is equal to for Operator.

  7. Select the right Choose a value field and enter Approve

    Screenshot of the condition.

Task 1.5 - Update status actions

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

  2. Enter update item in the search box.

  3. Select Update item under SharePoint.

  4. Select the Update item action name and enter Set task to approved

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

  6. Select the Tasks list for List Name.

  7. Enter / into the Id field and select Insert dynamic content.

  8. Select ID from New task.

  9. Select Show all next to Advanced parameters.

  10. Enter / into the Title field and select Insert dynamic content.

  11. Select Title from New task.

  12. Select Approved for Approval Status Value.

  13. Select the + icon under False to add an action.

  14. Enter update item in the search box.

  15. Select Update item under SharePoint.

  16. Select the Update item 1 action name and enter Set task to declined.

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

  18. Select the Tasks list for List Name.

  19. Enter / into the Id field and select Insert dynamic content.

  20. Select ID from New task.

  21. Select Show all.

  22. Enter / into the Title field and select Insert dynamic content.

  23. Select Title from New task.

  24. Select Declined for Approval Status Value.

  25. Select Save.

  26. Verify that a message appears indicating that your flow is ready to go.

  27. Select the <- Back button from the top left of the command bar.

Exercise 2 – Test approval

Task 2.1 - Trigger approval flow

  1. Navigate to the SharePoint site and select the Tasks list.

  2. Select + New to add a new item, enter the following data, and then select Save:

    1. Title=Approval test
    2. Description=Test
    3. Owner Name=MOD Administrator
    4. Deadline=Today
    5. Approval Status=New

Task 2.2 - Progress approval

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

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

  3. Select My flows from the left navigation menu.

  4. Select Task approval.

  5. Select the date and time in the 28-day run history.

  6. Open a new browser tab and navigate to the Power Automate portal https://make.powerautomate.com

  7. Select Approvals from the left navigation menu.

    Screenshot of approvals in the portal.

  8. Select the Approval test, select the Tick, and select Confirm.

  9. Select Done.

  10. Select My flows from the left navigation menu.

  11. Select Task approval.

  12. Select the date and time in the 28-day run history.

  13. Expand the Condition action and verify that the True branch ran successfully.

  14. Navigate to the SharePoint site and select the Tasks list.

  15. Verify that the Approval status of the Approval test item is Approved.