Hi,
I'd be happy to help you out with your question. Sorry for the inconvenience caused.
Firstly, please open your Power Automate flow and locate the action that generates the HTML file. This could be a "Create HTML file" action or a similar action.
Click on the action to open its settings and locate the section where you can edit the HTML file's content. This is usually labeled "Content" or "HTML body".
In this section, you will need to modify the HTML code to add rows for each question. This will require some basic knowledge of HTML, but don't worry, I'll guide you through it.
Find the part of the HTML code that generates the columns for the questions. This will likely be a table with a header row and several data rows, each representing a question and its answer.
To add rows for each question, you will need to modify this table to add a new row for each question. You can do this by copying and pasting one of the existing data rows and modifying it to represent the new question. You can also add new rows manually by adding the necessary HTML code.
Once you have added the new rows, you may need to adjust the formatting of the table to ensure that it looks correct. This may require modifying the CSS code that controls the appearance of the table.
To add CSS to the flow, you will need to use the "Apply to each" action. This action allows you to loop through a collection of items and apply an action to each item. In this case, you will want to apply the CSS to the HTML file.
To use the "Apply to each" action, you will need to create an array of items to loop through. This could be an array of questions and answers, for example.
In the "Apply to each" action, you can add a "Compose" action that generates the CSS code. This code can be stored in a variable and then used to modify the HTML file in the next step.
Finally, you can use the "Update file" or similar action to update the HTML file with the modified content and CSS code.
For more Information, please refer to following resources :-
- Adding rows to a HTML table - Power Platform Community - https://powerusers.microsoft.com/t5/Building-Flows/Adding-rows-to-a-HTML-table/td-p/450654
- Add row to HTML table · Community - https://ideas.powerautomate.com/d365community/idea/0c5d4cd8-7d4e-4640-b67d-224b48f54950
If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.