This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.
I am Shadrack Inusah, a graduate Gold Microsoft Learn Student Ambassador from Accra-Ghana, a software developer enthusiast with community building experience and a members of the Microsoft Learn Student Ambassadors Low Code No Code League. I Love to help student learn and build together to solve a technical world problem. Create awesome stuff in M365 and Power Platform. I'm a Power Addict and Mentor students for the MLSA program in Africa.
In my first blog, I will be taking you through the creation of an approval request flow in Power Automate when a form filled and send an adaptive card to Teams for approval. After approval, the data then updates in real-time excel online. All this happens with just a click and no demanding work is needed to execute this flow. This will be in two parts; the final part will be submitting approvals with or without attachments using a condition.
To begin with you will need a Microsoft 365 account which will give you access to all the business applications and developer tools. You can sign up for a Free Microsoft 365 E5 instant sandbox or watch a video I made on that.
When all is set, head to teams, and create a channel where the adaptive cards will be sent to for approvals and add all who the request are to be assigned to, to the teams channel.
New to Microsoft Teams, then head here to read on creating a channel in teams.
Here, I created a Team called "APPROVAL TEST" and later created a channel called "Approvals1".
After you are done with your Teams setup, next thing to do is to create a MS Form through which the request will be made from.
Customize the form to suit your request details.
I created a form called "Approval form" which I will be using also in the blog.
Next is the creating of the flow in Power Automate to receive the response from the form and process it for approval in Teams using Teams Adaptive card.
This will be done in few steps;
1. Click the "Create" link on the left pane of the Power Automate home.
2. Click "Automated cloud flow" (Automated cloud flow Triggered by a designated event) from the next page.
3. From the popup mini window, give your Flow a name and choose your flow's trigger. Here we will select "When a new response is submitted" (Microsoft Forms). This operation triggers a flow when a new response is submitted.
Click create after that.
4. In this step, select the following:
- Form ID - Approval form (MS form created)
- Response Id - Response Id (Select from the Dynamic content popup)
5. Add a new action, search for "create and approval" and click on it.
- Approval type - "Approve/Reject - Everyone must approve" (Select what suit your approval request)
- Title - "NEW APPROVAL REQUEST" (Your preferred title here)
- Assigned to - "Type in the email of the approver" (email@example.com)
- Details - "Select from the dynamic content the "Give Reason" field from the MS Form we created.
- Item link - Add a link to the item to approve (optional)
- Item link description - Describe the link to the item (optional)
6. Add a new action, search for "Post adaptive card in a chat or channel" and click on it.
- Post as - "Flow bot"
- Post in - "Channel"
- Team - "Approval Test" (Select the team in which you have your channel located)
- Channel - "Approvals1" (Select the channel here)
- Adaptive Card - Select "Teams Adaptive Card" from the dynamic contents.
REAL-TIME DATA UPDATE IN EXCEL ONLINE
After a request is approved or rejected the result is expected to be recorded in an excel online table for usage.
To do that, you will need to create an excel sheet online and create a table in the sheet with form fields as header for the table.
Steps in creating Table in excel online:
2. Create a table in the excel sheet. To do that type the headers in the first row (A1, B1, C2...)
- A1 - What do you need? (From the MS Form)
- B1 - Give reason (From the MS Form)
- C1 - Respond (Here is where the response will be updated - Approved or Rejected)
3. Select the headers in the sheet and click the "Insert Tab".
4. Click "Table" from the table group and make sure the check box is ticked then click "OK".
5. Continuing the Flow steps from the previous step, add a new action and type "Excel Online - Business". Select "Add a row into a table".
- Location - OneDrive for Business
- Document Library - OneDrive
- File - Select the excel sheet you created here by clicking the folder icon.
- Table - Select the table in the sheet ours is "Table1".
Note: After selecting the right table the columns headers show automatically. Use the dynamic contents from the MS Form to fill the table.
- For the "Response field", select "Outcome" from the dynamic content.
FINAL FLOW TEST
1. MS Form is submitted
2. Adaptive Card is sent to Teams for Approval
3. Excel Online sheet then gets updated with the final data.
In the final part, we will look more into advancing this flow to accepted attachment as responder evidence in the approval request.
See you on the next blog post.
Resources to get you started and keep going!
Getting Started with Power Automate and Microsoft Learn