A good way to get started is to use a template that is suited to your organization’s scenario. You can choose from a collection of templates to find the one that best matches your scenario. Search all templates or browse by category to find your scenario, and then follow the steps in the template to create a cloud flow from the template.
You can tweak templates by adding, editing, or removing triggers and actions to create your own flows. You can copy paste actions in the same flow or across flows to speed up the your tweaks.
In this lab, you will create a cloud flow using a Power Automate template that will create an approval workflow when a SharePoint list item is created
Learning objectives
- Approvals and conditionsDuration
- 30 minutesScenario
- A user stores purchase information in a SharePoint list named Purchase Approvals. When a new purchase request is created, a flow is triggered and asks a manager/user to Approve/Reject.Prerequisites
- Each student must have a dedicated custom SharePoint list named Expense. The list must have four fields: Title, Amount (currency), Justification (multiple lines) and Status (single line of text). The student will create this list in the first task of this lab.Remarks
- the first time approval is created in an environment, the system provisions the infrastructure (approval system tables are made in the internal database, which is Dataverse) needed for the approvals. Therefore, the first approval may take some time to appear.Create your own custom SharePoint list using the following steps:
Import a SharePoint list
a. Click on Home > + New > List
b. Click on From CSV
c. Upload Expense.csv from the resources of this lab and customize the list
d. Rename the list as Expense. Click on Create.
Create a cloud flow from a template: a. Navigate to Templates and search for send approval email when new item is added. Click on the first automated flow.
b. Ensure all connections are authenticated. If not, please fix your connections. Click Continue.
c. Update the values in the trigger. Site address: https://edumscloud.sharepoint.com/sites/PowerAutomateDemos and List Name: Expense
d. Customize the template to add a new action after the trigger. Click on the + button followed by Add an Action.
e. Search for Get my profile and select Get my profile(v2) from the action list
f. Update the next action Start and wait for approval.
Item Link: Dynamic content from Link to Item
!
g. Edit Apply for each control flow.
If approve response is Approve, edit the Send an email(v2) action as below
Body: Email body with dynamic content - Created by Display Name, Title, Display Name
If approver response is Reject, add a Send an email(v2) action as below:
h. Update the status of expense claim in the Sharepoint List
If approve response is Approve, update the status as Approved and Rejected if approve response is Rejected
i. Save the flow
Test the flow by adding an expense item to the SharePoint list using the following steps: a. Navigate to your SharePoint list, for example, by clicking on the list name on the Quick Launch bar.
b. Click New and complete the form similar to the following screenshot (keep the Status field empty):
c. Save the new record, which will automatically trigger the flow. e. Check the flow status. It should be running:
f. Click the running flow to see the progress of this instance of the flow:
g. Approve or reject the expense claim request by either making a selection on your email or in the Approvals Centre
h. Approve or Reject, and once the approval/rejection is completed, check the status value in the list.