Upgrade Your Approval Requests : Add a Dynamic Table to Your Power Automate Approval Requests

Upgrade Your Approval Requests : Add a Dynamic Table to Your Power Automate Approval Requests

Power Automate is a powerful tool that allows you to automate business processes by creating workflows between different apps and services.

One of the many features of Power Automate is the ability to create dynamic tables and add them in details in an approval e-mails. This can be useful in many scenarios, such as when you need to send a report to someone for approval before proceeding with the next step.

While adding a dynamic table in an approval email in Power Automate can be a useful feature, there are some limitations to consider. Because the HTML table is not supported in the markdown.

For further information about the markdown supprot in approval requests: https://learn.microsoft.com/en-us/power-automate/approvals-markdown-support

In this article, we will guide you through the steps to create a dynamic table in Power Automate and add it in details in approval.


Step 1: Create a dynamic table

To start, you need to create a dynamic table that will pull data from the data source. To do this, follow these steps:

  1. Add a "Get items" action to your flow.
  2. Select the SharePoint site and list from which you want to get the items.
  3. Configure the filter query to get the specific items you want to include in the table.
  4. Add a "Select" action to your flow.
  5. Specify the columns you want to include in the table.

Aucun texte alternatif pour cette image

Now run the flow and copy the body of select action we will need it later.

Aucun texte alternatif pour cette image

Step 2:Add Parse JSON action

In the Content section: put the output of the select action.

And for the Schema section: Paste the body of the select action that you had copied it from the previous step.

Aucun texte alternatif pour cette image

Step3: Initialize variable

Now , add the Initialize variable . Name it for example "Message approval" and in the type select String.

For the Value put your colmuns name seperated with "|" then return to the line and add the same number of your columns but instead of the name of the column put "--" with the same length of the name of each column as in the picture below.

Don't forget to separte them with "|".

Aucun texte alternatif pour cette image

Step4: Add the content of your list to the table

  1. Add an apply to each action .

Aucun texte alternatif pour cette image

2.Put in the output the Body of the Parse JSON action.

3.Add an Append to string variable:

  • In the name choose: your first variable that you had initialized in step3.
  • For the value:Return to the line and put the columns name separated with "|" but this time for the columns name choose them from the dynamic content of the Parse JSON action.

Aucun texte alternatif pour cette image

Step5: Start and wait for approval

Finally, add the action Start and wait for approval.

Choose the type that you want , title and the person to who you assign this approval request and in the details section put the "Message approval" variable.

Aucun texte alternatif pour cette image

After runing your flow the approval mail will be like this:

Aucun texte alternatif pour cette image

Attention:

This method only work with e-mails and don't work with Teams approval! Tables are not supproted and you will have something like this:

Aucun texte alternatif pour cette image
Deepmala Khatri

Revenue Assurance Manager at Johnson & Johnson

10 个月

Do you have an easier way to add table?

回复
Pooja Yadav

Power Platform Developer | Power Apps | Power Automate | Power BI | Power Virtual Agents | Common Data Services | Microsoft Azure | SQL

1 年

Hi Samar Ghabri thankful that I could use your post for one of my task. But I am facing issue in getting the dynamic outputs in separate rows. Below is the screenshot. Could you please help me understand what am I doing wrong ?

  • 该图片无替代文字
Sunny Waje

Operations Excellence | Mechanical Engineer | LSSGB

1 年

What if I want to get Headers in One column and data in another how can i do that?

回复
Anthony Amador

Power Platform Consultant | RPA Developer

1 年

Great idea, you should post it in the Power Automate community ??

回复

要查看或添加评论,请登录

Samar Ghabri的更多文章

社区洞察

其他会员也浏览了