Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Populate HTML Template from Sharepoint List

I successfully was able to create a pdf from a docx template using a Sharepoint list:


When I fill in fields in my PowerApp, it goes to Sharepoint Lists metadata, then a Sharepoint library with a docx template and copies the metadata over, then makes a pdf.


But I want to also simultaneously use the Sharepoint List metadata to populate placeholders in an html file. I also created a new flow and managed to create an html file from template using these Plumsail instructions:


But obviously I need some way to have the Sharepoint List data do the populating of the placeholders in the html file. I am having trouble getting clarity on the matter on how to do this. Also, my .docx is vastly different from my .html template. So I need the Sharepoint list to populate each.


Any suggestions? Maybe there is something that creates a JSON with the list data, and then automatically has that populate the html file?

Dual Super User II
Dual Super User II

Hi @sarahpoulin 

So looking at this example below; i understand you want to populate the Items Array? 


You have to Initialize an array variable as below


Loop on your Sharepoint list and add a compose data operation action in the below format:


"Quantity": Variable from URL Sharepoint List,
"SubTotal": Variable from URL Sharepoint List,
"Title": Variable from URL Sharepoint List,
"Unit Price": Variable from URL Sharepoint List,

Then append the output of your Compose action to array you have initialized earlier




Then Construct a JSON object the Similar way using Compose Data Operation in this format:


Invoice: Variable,

Items: HERE Add output from your array


And pass it to the next steps that Generates the HTML.


Please check also my blog post on Populating Word Templates it is using the same approach/


If this helps you solve your problem, Please mark as accepted solution.


If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Helpful resources

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (55,183)