04-Power Automate Lab Manual
04-Power Automate Lab Manual
04-Power Automate Lab Manual
App in a Day
Module 4: Power Automate
Hands-on Lab Step-by-Step
May 2020
Contents
Power Automate .................................................................................................................................................................... 1
References ............................................................................................................................................................................ 26
Copyright ............................................................................................................................................................................. 27
Power Platform App in a Day Module 4: Power Automate
Power Automate
Lab Prerequisites
This is the fourth lab in a five-part series covering Power Apps, Common Data Service, and Power Automate. The
assumption is that you have successfully completed the first three modules, or at least the initial part of setting up an
environment as described in the overview – “00-AppInADay Lab Overview.pdf”.
If you have not completed the previous modules, you can use the partially completed version of the lab package in the
“\Completed\Module3” folder. Follow the instructions in the document “Importing Module 3 Completed” before
proceeding with this module, which will provision the app and the Common Data Service entity into your environment.
There are two ways to create a flow – from blank or from a template. In this lab, we will create the approval flow
starting with a blank flow.
2. Select Flows.
In this scenario, we will configure the flow to trigger when a new item is added to the Device Order entity table in the
Common Data Service
1. Enter a name for your flow, such as – “New device approval request”
2. In the Choose your flow’s trigger box, enter Common Data Service and select When a record is created -
Common Data Service.
3. Click Create
4. Click the Environment drop-down and select Current.
5. Click the Entity Name drop-down and select Device Orders. You can type “device orders” to search for it.
6. Click the Scope drop-down and select Organization. Scope allows you to limit when your flow will run, for
example you could choose User and it would only run for orders you create. In this case you are choosing
organization because you want this flow to run for records created by anyone in your entire organization.
2. Search for Approvals and select Start and wait for an approval.
This will use the modern approval service. For more information see the blog post at Flow Modern Approvals.
4. For the Title, we will add some text and one variable. This variable will contain the Device Name of the device
order request. Enter New device request for in the Title text box.
Note: if the Dynamic content box is not visible, click the Add dynamic content button -
6. Select the Assigned to field, select click Approver. Click on the Add dynamic content button to show/hide the
dynamic content pane.
You might get a warning message about this field being optional. Ignore it and ignore similar warnings in future.
Note: Recall from the earlier lab that this will be the approver’s email address.
9. In the Details field, type A new device has been requested and hit <Enter>.
11. Type , $ and select Price. You may need to click the "See More" option under the dynamic content search bar in
order to see the Price option.
15. Your Flow will now look like the image below.
Note: When creating your own approval flows, you may additionally include a clickable link that will be displayed in the
approval email. In this scenario, for example, you could include a link to view device details in an online catalogue. You
would include the Item link and Item link description.
Note: You could also set the Item link to deep link into a Power Apps app to view more details about the request. In this
scenario, you might pass an OrderID or a DeviceID as a URL parameter. Power Apps accepts URL parameters, see Flow URL
Patameters for more details.
3. Click in the left edit box that says, “Choose a value” and select Outcome from the dynamic content pane. You may
need to press the “+” icon below the edit box to hide the dynamic content pane.
2. Search for Common Data Service and select Common Data Service – Update a record
This is the unique lookup ID for the record that was created.
8. Select the Approved Date field and select the Expression tab.
10. In the Comments field, we want to preserve the earlier comments and append on the comments from the
approver. To do so, select the Comments field and select Comments.
2. Search for send email and select Send an email (V2) – Office 365 Outlook.
4. Click Accept.
6. Select Requested By for To. Select from under the When a record is created section.
Is
©2020 Microsoft Corporation 14 | P a g e
Power Platform App in a Day Module 4: Power Automate
9. Set the Body value as shown below. Select Device Name and Estimated Ship Date from underneath the When
a record is created header.
Note: If you do not have an Office 365 mailbox setup, you can use one of the other connectors to send the email, such as
Outlook.com, Gmail or SendGrid.
1. Select I’ll Perform the Trigger Action and click Save & Test.
7. Click OK.
8. The flow will run and send email to the manager email you provided. The request for approval email will look like
the image below; it will include Device information, Price, Department Contribution (the calculated field), and
the Requester Comment.
REMINDER: If the flow does not run immediately, please wait, it may take up to ten minutes for the flow to be
triggered. To ensure the flow runs immediately, see note above - select the Test option in the top right and select
the “I’ll perform the trigger action” option. Then go ahead and submit a device request. The flow should run
immediately. The email, however, may take a few minutes to appear regardless of when the flow starts.
9. Click Approve.
10. Add a comment and click Submit.
11. The flow will continue to run; it will update the record and send an email to the requestor. The email sent to the
requester will look like the image below.
12. Check the flow, you will notice that the flow is now marked as Succeeded in the run history.
3. Search for Common Data Service and select Common Data Service – Update a record.
4. Select Current for environment, Device Orders for Entity Name, select Device Order for Record Identifier, and
click Show advanced options
7. Search for send email and select Send an email (v2) - Office 365 Outlook.
8. Provide the information shown on the image below. This will send an email to the requestor informing them that
their device request was not approved. Select Requested By and Device Name from under the When a record is
created header.
4. Confirm that the requestor receives an email informing them that their device approval request was rejected.
5. Navigate to Make Power Apps select Apps and start the Device Procurement application.
5. Go ahead and approve or reject a request from this screen. The details are displayed in the right pane where you
can enter comments and Confirm.
Note: All approval requests sent to the current logged on user will be visible in the Approvals Center. This includes approvals
sent from any app or flow.
7. You can also use the Approvals Center to view all requests that you have sent and are Awaiting response from
the approver. Select the Sent requests tab at the top to view all requests that you have sent.
8. Open the Power Automate mobile app on your mobile device.
9. Login and switch to the environment where the flow is deployed.
10. Select Approvals in the top right and view all pending approvals.
11. You can quickly approve or reject these pending requests from this screen.
12. If you have push notifications turned on and are signed into the flow mobile app – when you receive a new
Approval request it will trigger a push notification on your phone. You can give this a shot.
Congratulations! You have successfully completed this lab. You have created your Power Apps app and flow and
connected them to a Common Data Service entity. Now you are ready to build your own apps and workflows.
Lab survey
We would appreciate your feedback on the Business Application Platform technologies and on this hands-on-lab, such as
the quality of documentation and the usefulness of the learning experience.
Please use the survey at App in a day survey to share your feedback.
You may provide feedback for each module as you complete it or at the end once you’ve completed all the modules.
Thank you!
References
App in a Day introduces some of the key functionalities available in Power Apps, Power Automate, Power BI and the
Common Data Service. For an up to date list of learning references, see Power Apps Resources and Power Automate
Resources and Power BI.
Copyright
© 2020 Microsoft Corporation. All rights reserved.
The technology/functionality described in this demo/lab is provided by Microsoft Corporation for purposes of obtaining
your feedback and to provide you with a learning experience. You may only use the demo/lab to evaluate such technology
features and functionality and provide feedback to Microsoft. You may not use it for any other purpose. You may not
modify, copy, distribute, transmit, display, perform, reproduce, publish, license, create derivative works from, transfer, or
sell this demo/lab or any portion thereof.
COPYING OR REPRODUCTION OF THE DEMO/LAB (OR ANY PORTION OF IT) TO ANY OTHER SERVER OR
LOCATION FOR FURTHER REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY PROHIBITED.
FEEDBACK. If you give feedback about the technology features, functionality and/or concepts described in this demo/lab
to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way
and for any purpose. You also give to third parties, without charge, any patent rights needed for their products,
technologies and services to use or interface with any specific parts of a Microsoft software or service that includes the
feedback. You will not give feedback that is subject to a license that requires Microsoft to license its software or
documentation to third parties because we include your feedback in them. These rights survive this agreement.
MICROSOFT CORPORATION HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS WITH REGARD TO THE
DEMO/LAB, INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY, WHETHER EXPRESS,
IMPLIED OR STATUTORY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT.
MICROSOFT DOES NOT MAKE ANY ASSURANCES OR REPRESENTATIONS WITH REGARD TO THE ACCURACY
OF THE RESULTS, OUTPUT THAT DERIVES FROM USE OF DEMO/ LAB, OR SUITABILITY OF THE INFORMATION
CONTAINED IN THE DEMO/LAB FOR ANY PURPOSE.
DISCLAIMER
This demo/lab contains only a portion of new features and enhancements in Microsoft Power Apps. Some of the features
might change in future releases of the product. In this demo/lab, you will learn about some, but not all, new features.