How to Create an HTML Table from an Array in Power Automate?

Do you want to know how to create an HTML table from an Array in Power Automate? Yes, then you are at the right place.

In this Power Automate tutorial, I will show you how to create HTML table from an array in Power Automate step by step.

Moreover, I will explain how to create HTML table from filter array in Power Automate.

How to Create an HTML Table from an Array in Power Automate

Here, I will explain how to create HTML table from an array in Power Automate. To achieve this, follow the steps below.

1. Open the Power Automate home page, click on + Create -> Select the Instant cloud flow -> Enter the flow name and choose the trigger’s flow (Manually trigger the flow).

Power Automate create HTML table from an Array

2. Next, add the ‘Initialize variable’ flow action to set the array to create an HTML table and set the required field.

  • Name: Provide the name of the variable.
  • Type: Select the type of the variable as Array.
  • Value: Provide the array value as shown below
[
  {
    "Employee Name": "Alex",
    "Employee Experience": 2,
    "Employee Department": "Finance"
  },
  {
    "Employee Name": "Michel",
    "Employee Experience": 3,
    "Employee Department": "Development"
  },
  {
    "Employee Name": "Ruby",
    "Employee Experience": 3,
    "Employee Department": "Finance"
  }
]
How to create HTML table from an array in Power Automate

3. For formatting and presenting data in a structured manner, add the ‘Create HTML table’. Set the required fields.

  • From: Here, I have given EmployeeDetails from dynamic content.
  • Columns: Select the type of columns.
Create HTML table in Power Automate from an Array

4. Now it’s time to Save and Test. Test it Manually -> Then the Create HTML table flow action will display the output according to the value of an array.

Power Automate create HTML table from an Array

This is how to create HTML table in Power Automate from an Array.

Create HTML table from Filter Array in Power Automate

Let’s see how to creates HTML table from filter array in Power Automate.

The “Filter array” action is typically used when you want to narrow down a list of items based on certain conditions. It is commonly used to select specific elements from an array or list.

To achieve this, follow the steps below.

1. Navigate to https://make.powerautomate.com in your browser to open the Power Automate home page, click on + Create -> Select the Instant cloud flow -> Provide the flow name and choose trigger’s flow (Manually trigger the flow).

2. To store the text value during the flow, add the ‘Initialize variable’ flow action and set the required fields.

  • Name: Provide the name of the initialized variable.
  • Type: Select the variable type as Array.
  • Value: Here, I have populated the value with the array.
[
{
"Product Name":"Gear lever",
"Product ID":"4567G"
},
{
"Product Name":"Oil Filter",
"Product ID":"1184O"
},
{
"Product Name":"Suspension",
"Product ID":"931S"
}
]
Create HTML table from filter array in Power Automate

3. Next, add the ‘Filter array’ flow action to narrow down a list of items based on certain conditions and provide all the details.

  • From: Select the Output of Initialize variable action from Dynamic content.
item()?['Part ID'] is equal to 1184O

where 1184O is the Part ID.

Power Automate create HTML table from filter array

4. Add the ‘Select’ flow action to transform or select specific properties from an array of objects and set the required fields.

  • From: Here, I have selected the Body of the Filter array action from dynamic content.
  • Map: Provide a value to define how you want to shape each object in the array.
{
"Part Name":@{item()?['Part Name']} ,
"Part ID":@{item()?['Part ID']}
 
}
How to create HTML table from filter array in Power Automate

5. Now, add the ‘Create HTML table’ flow action for formatting and presenting data in a structured manner and set the required fields.

  • From: Here, I have given the Output of the Select flow action from Dynamic content.
  • Columns: Select the type of column you want to display in the HTML table.
Power Automate example to create HTML table from filter array

6. Now, it’s time to Save and Test -> Click on Test and test it Manually -> Then the Create HTML table flow action displays the output as shown below.

Example how Power Automate create HTML table from filter array

This is how to create an HTML table in Power Automate from a filter array.

Conclusion

I hope you find this Power Automate tutorial helpful. Here, I have explained how to create HTML table in Power Automate from an Array. I have also shown how to create an HTML table from a filter array in Power Automate.

You may also like: