Exercise - Update the flow

Completed

In this exercise, you add two actions to the False branch.

Note

To complete the exercises, you'll need to use a few files. Download the App in a Day files for use in this module. The file folders that are in this download include:

  • Completed modules with instructions - Package files to import the completed exercise steps.
  • Machine-Order-Data.xlsx - File used in the exercises.

Section 1: Add actions

To add actions, follow these steps:

  1. If you don't already have the flow open, from Power Automate, select your Contoso Coffee solution, select your flow, and select Edit from the upper ribbon to open it in Edit mode.

    Screenshot with an arrow pointing to the Edit button.

  2. In the False branch of your Condition, select the + icon to open the Add an action pane.

    Screenshot showing the add an action button.

  3. Search for Update a row and select Update a row (Dataverse).

    Screenshot of Update a Row entered in the search field under the Actions tab in the Choose an operation menu.

  4. Select Machine Orders from the Table name dropdown menu, and select Machine Order for Row ID.

    Screenshot of the Machine Order dynamic content added to the Row ID field.

  5. Select Show all next to Advanced Parameters.

  6. Select Reject for the Approval Status.

    Screenshot with a box around Reject in the Approval Status value field.

  7. In the False branch of your Condition, select the + icon to open the Add an action pane.

  8. Search for send email and then select Send an email (V2) - Office 365 Outlook.

    Screenshot showing the Send an email (V2) Office 365 Outlook option in the Choose an action menu.

  9. Switch to Advanced mode above the To field, and then select the To field and choose Requested By from the Dynamic content pane, under the When a row is added, modified or deleted section.

  10. Enter Your machine was not approved in the Subject field.

  11. Type Sorry, your request for in the body, and then select Machine Name from the Dynamic content pane, below the When row is added, modified or deleted section.

  12. Type was NOT APPROVED. after the machine name.

  13. Hit Return to move to the next line of the body. Select Response summary from the Dynamic content pane, under the Start and wait for an approval section.

    The email should now resemble the following image.

    Screenshot of the Send an email action with fields filled in with information.

  14. Save the flow.

Section 2: Test the updated flow

To test the updated flow, follow these steps:

  1. Run the Machine Ordering canvas app.

  2. Select a machine, hit compare, and submit the machine request.

  3. You should receive an email with options to Approve or Reject the request. Select Reject this time and then enter some comments, such as Machine no longer available. When you're finished, select Submit.

    Screenshot with an arrow pointing to the Submit button under the Comments field reading Machine no longer available.

  4. Confirm that the requestor receives an email informing them that their machine approval request was rejected.

    Screenshot of the rejection email.

  5. Go to Make Power Apps, select Apps, and choose the Machine Procurement application, and select Play from the tool bar.

    Screenshot with a box around the Machine Procurement option and showing the Play button.

  6. Active Machine Orders should now show the Approval Status column.

    Screenshot with a box around the Approval Status column on the Active Machine Orders page.

Section 3: Go to the approval center

To access the approval center, follow these steps:

  1. Use the Machine Ordering app to submit a few more approval requests.

  2. Go to Power Automate, make sure that you're in the correct environment, and then sign in with your lab credentials if prompted.

  3. In the left-hand pane, select Approvals.

    Screenshot with an arrow pointing to the Approvals button.

    All pending approval requests should be visible in the Received section.

  4. Approve or reject a request from this screen. The details are displayed in the right pane, where you can Add a comment and Confirm.

    Screenshot of the Respond: Approve pane.

    The request is no longer visible because it already processed.

    Note

    All approval requests that are sent to the current signed-in user will be visible in the approval center, including approvals that are sent from any app or flow.

  5. You can also use the approval center to view all requests that you sent and are awaiting response from the approver. Select the Sent tab in the upper part of the screen to view all requests that you sent.

  6. Open the Power Automate mobile app on your mobile device.

  7. Sign in and switch to the environment where the flow is deployed.

    Screenshot with an arrow pointing to the account button and a prompt confirming your environment.

  8. Select Approvals in the bottom right and view all pending approvals.

    Screenshot with a box around the Approvals tab in the upper right of the screen.

  9. You can quickly approve or reject these pending requests from this screen.

  10. If you have push notifications turned on and you're signed in to the flow mobile app, when you receive a new approval request, it triggers a push notification on your phone. Try out this functionality.

Congratulations, you successfully completed this lab. You created your Power Apps application and flow, and you connected them to a Microsoft Dataverse table. Now, you're ready to build your own apps and workflows.