Create Approval Flow in Power Automate with Adaptive Card in MS Teams from MS Form response (Part 1)
Published Dec 07 2021 09:17 AM 18.7K Views
Brass Contributor

I am Shadrack Inusah, a graduate Gold Microsoft Learn Student Ambassador from Accra-Ghana, a software developer enthusiast with community building experience and a member 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.

 

STEP 1

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".

Teams channel to display adaptive card for approvalTeams channel to display adaptive card for approval

 

STEP 2

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.

2021-12-06_125359.png

 

STEP 3

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.

2021-12-06_143935.png

 

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.

2021-12-06_144942.png

 

4. In this step, select the following:

  • Form ID - Approval form (MS form created)
  • Response Id - Response Id (Select from the Dynamic content popup)

2021-12-06_150540.png

 

 

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" (name@email.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)

2021-12-06_151732.png

 

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.

2021-12-06_155546.png

 

STEP 4

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:

1. Create an Excel online sheet, give it a name you can remember. That can be accessed from your portal or visit the link.

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".

2021-12-06_170312.png

 

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.

2021-12-06_171720.png

 

 

FINAL FLOW TEST

1. MS Form is submitted

2021-12-06_223810.png 

 

2. Adaptive Card is sent to Teams for Approval

Inked2021-12-06_223852.jpg

 

3. Excel Online sheet then gets updated with the final data.

2021-12-06_224553.png

 

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

Official Power Automate website

Automate a business process using Power Automate
Free Microsoft 365 E5 instant sandbox

How to create Approval Flow in Power Automate with Adaptive Cards in MS Teams

Overview of Adaptive Cards for Microsoft Teams

 

2 Comments
Co-Authors
Version history
Last update:
‎Dec 07 2021 03:35 AM
Updated by: