Adding Rows to html file using power automate for a form.

Razi, Syed 0 Reputation points
2023-04-21T01:42:00.4966667+00:00

Hi All, I am not that technical person especially in programming so please post step by step direction. I have created a flow in power automate on receiving response of a form. Now I have created a PDF through HTML file for responses. The PDF is adding columns for all the questions but i want to add rows for each question... Now, i have seen some videos to add JSON or CSS. I am not sure how to add CSS to the flow. Can someone please help me. Thanks

Microsoft 365 and Office SharePoint For business Windows
Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-04-21T08:36:26.08+00:00

    Hi @Razi, Syed

    Since your issue is about powers automate, and our forum focus on SharePoint. I wil recommend you to raise a new ticket Microsoft Power Automate Community. This is a Microsoft forum dedicated to discussing Power Automate. You might get some more professional advice there. Thanks for your understanding.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Limitless Technology 44,751 Reputation points
    2023-04-21T11:45:54.02+00:00

    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 :-

    1. 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
    2. 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.