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 the + Create tab from the left navigation panel.

  4. Select Automated cloud flow.

  5. Enter Task approval for Flow name.

  6. Enter SharePoint in Search all triggers.

  7. Select When an item is created.

  8. Select Create.

Task 1.2 - Configure the trigger

  1. Select the When an item is created step.

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

  3. 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 Autmate SharePoint site

  4. Select the Tasks list.

    Screenshot of SharePoint trigger.

Task 1.3 - Add approval action

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

  2. Enter approval in search.

    Screenshot of approvals search.

  3. Select Start and wait for an approval under Approvals.

  4. Select Create New.

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

  6. Select Start and wait for an approval step 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, select Link to item.

Task 1.4 - Add condition

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

  2. Enter condition in search.

  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 and select Add an action.

  2. Enter update item in search.

  3. Select Update item under SharePoint.

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

  5. Select the Power Automate SharePoint site.

  6. Select the Tasks list.

  7. Enter / into the Id field and select Insert Dynamic Content.

  8. Select ID from New task.

  9. Select Show all under 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 and select Add an action.

  14. Enter update item in search.

  15. Select Update item under SharePoint.

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

  17. Select the Power Automate SharePoint site.

  18. Select the Tasks list.

  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. 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 + Add new item and enter the following data and 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 the My flows tab from the left navigation menu.

  4. Select Task approval.

  5. Select the date and time in the flow run history.

    Note: The Approvals functionality will be installed in the background. This will take approximately 10 minutes.

  6. Select the Approvals tab from the left navigation menu.

    Screenshot of approvals in the portal.

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

  8. Select Done.

  9. Select the My flows tab from the left navigation menu.

  10. Select Task approval.

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

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

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