How to Create an HTML Table from Microsoft Form in Power Automate?

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

In this Power Automate tutorial, I will demonstrate how we can create an HTML table from Microsoft Forms in Power Automate with a simple example.

Microsoft Forms is a set of actions and triggers that allow you to integrate Microsoft Forms with other services and automate various Power Automate flows.

How to Create an HTML Table from Microsoft Form in Power Automate

Let us create an HTML table with Microsoft Forms using Power Automate step by step.

For this, I have created a Microsoft form named “Candidate List” that consists of some fields such as Candidate Name, Candidate Email ID, Candidate DOB, and Candidate Address, as shown below.

Power Automate Create HTML Table from Microsoft Form

While using Microsoft-related action, we need a Form ID that will be fetched from the URL of the Microsoft form, as shown below.

Create HTML Table in Power Automate from Microsoft Forms

To achieve this, follow the steps below.

1. Navigate to https://make.powerautomate.com to open the Power Automate home page. Click on + Create -> Select the Automate cloud flow -> Set the flow name, choose the trigger’s flow (When a new response is submitted), and set the required field.

  • Form Id: Copy the form Id from the site address and paste it into the Form Id.
How Power Automate create HTML table using Microsoft Form
  • Then it will automatically take the name of the Microsoft form as shown below.
Power Automate create HTML table with Microsoft Form

2. Now, add the ‘Get response details’ flow action to retrieve detailed information about a specific response to a Microsoft Form and set the required fields.

  • Form Id: Provide the Form Id.
  • Response Id: Select the Response Id from dynamic content.
Create HTML table from Microsoft Form in Power Automate

3. Add the ‘Compose’ flow action and provide the expression to create HTML table of candidate responses and set the required fields as shown below.

<h2>Candidate Responses: Answer</h2>
<table border="1">
<tr>
 <td>Candidate Name</td>
 <td>@{outputs('Get_response_details')?['body/r4871d29ef5b7498589fee997dbc38057']} </td>
</tr>
<tr>
 <td>Candidate Email ID</td>
 <td>@{outputs('Get_response_details')?['body/r16d4b66b7e484bc58dda1a39e89d84c0']}</td>
 </tr>
   <td>Candidate DOB</td>
  <td>@{outputs('Get_response_details')?['body/ra061e7f80cee48fe9c1429a54b156b7f']}</td>
  <tr>
    <td>Candidate Address</td>
    <td> @{outputs('Get_response_details')?['body/rde060b6f07d1406297f3cd906fbc9e78']}</td>
   </tr>
</table>

where,

  • <h2>= This is an HTML heading element () with the text “Candidate Responses: Answer.” It represents a second-level heading in HTML.
  • <table border=”1″> = This starts defining an HTML table. The border=”1″ attribute sets a border around the table.
  • <tr>= This represents a table row. You have one row for each candidate attribute (Name, Email ID, DOB, Address).
  • <td>= This represents a table cell. You have two cells in each row, one for the attribute label (e.g., “Candidate Name”) and one for the corresponding response value.
  • @{outputs(‘Get_response_details’)? [‘body/…’]} = This is using the Power Automate expression to retrieve the values from the “Get response details” action.
How to Create an HTML Table from Microsoft Form in Power Automate

4. Next, add the ‘Send an email(V2)’ flow action to display the output in the table form and set all the details.

Create HTML table in Power Automate with Microsoft Form

5. Now, it’s time to Save and Test -> Click on Test and test it Manually -> Then the Send an email(V2) flow action will display the output in Outlook’s inbox as shown below.

How to create HTML table from Microsoft Form in Power Automate

Conclusion

I hope you find this Power Automate tutorial helpful. We discussed creating an HTML table from Microsoft Forms in Power Automate.

Additionally, you may like some more Power Automate tutorials: