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.

Blog: here

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,956)