Populate a Word Template table Dynamically with Power Automate

preview_player
Показать описание
In this video we populate a word template dynamically based on a list in SharePoint. We use the repeating content control in MS Word, SharePoint and Power Automate to do that.

Come check it out we are using the new modern look & feel of power automate too!

Populating word repeating sections dynamically with Power Automate involves using the application's ability to automate tasks and process data within Microsoft Word documents. Specifically, you can create a flow that takes input data, such as text or values from forms, databases, or other sources, and inserts this data into predefined sections of a Word template. This process typically uses Word templates with content controls or placeholders that are identified and filled out by the flow based on the input. For example, you might have a Word document with repeating sections for items in an invoice, and Power Automate can dynamically fill these sections based on a list of items from an order processing system. This approach streamlines document creation, ensures consistency, and reduces manual errors by automating repetitive tasks and data entry.

My name is Andrew Hess please like and subscribe if this content is helpful!
Рекомендации по теме
Комментарии
Автор

Great video, Im having trouble where my select is going inside an apply to each, i dont understand how the select in your video does not do the same? I'm unable to use the output in the word document because of this as well. Thanks

TomGeorge-gldd
Автор

Thanks for that. Well, the premium Word connector works well, I managed to do populate templates... however, it is very limited, I wish there was a way to run a VB script to deal with specificities, etc. We run templates at my office but in several languages, so we have macro that deals with styles to use, table/column size specificities, etc. I haven't tested this list/Word connector in other languages such as Arabic, Chinese. So at the end, considering the limitation above, I have created a Power App that get the data from the list and allow client to enter further data using a form.... then PowerApp with PowerAutomate will create a data file (TXT) that is sent by email.... then I have an Outlook macro that get the TXT file, parse it (read properties, read data for bookmarks, etc.), launch MS Word, fill the bookmarks and do all the specificities and upload output file in Sharepoint and send the template to client by email. This is a workaround until VB script can be run on the cloud. It has downsides but it works great, we have more than 100 templates/categories in six language.

TheBigBosske
Автор

Perfect Video, really, I tried to do this, and after some days, I did it, but, here I don´t have the premium license. However, I did using the html of the word, kkk, and it's working, but I had to remember a sort of thing oh html, but its possible, U just need save the doc in html, and open in the note reader, copy and initialize a variable in the flow, and another for the lines from sharepoint. And finally create the archive, but just in html, so U will have to open with Word, and after save the doc. Its a way to do it without premium. I hope its useful. Nice video, I love it.

GuilhermeDSa
Автор

Hi @Andrew Hess, Thank you for your suggestion. I’ve identified a solution. However, I have a question: Is it possible to dynamically select a specific template at runtime based on input values? For instance, if we have more than 40 templates (e.g., Temp1, Temp2, Temp3, etc.), can the system choose the correct template depending on the provided input?

Looking forward to your guidance.

IAmaProgrammers
Автор

Amazing work ❤ very useful next time if possible for you in your upcoming video consider the use case of adobe sign after generate this kind of word invoice the convert in pdf + get signature even use of premium connector of adobe esign. 😊

dxbranag
Автор

hello Andrew,

if the input for the word document is from the sharepoint list, does the users has to have contribute access to the document template too?

Soulebi
Автор

Do you have a video for calculating total as you have mentioned in this video?

dynamicsseries
Автор

Hi. After you created and populated .docx file can we remove placeholder from Docx file ?

IAmaProgrammers
Автор

Tks, I could do it follow him, but, when I view docx file, I can hide the tag on table, "mytable" title and tag on my destination file. Could you help for hide it

premiumytb-bhjd
Автор

Firstly great video and thanks for sharing. My returned Word .docx document content controls are not editable though, is there I way I can make them editable so that the end user can change some of the content or add to it? My end user would not have access to the Developer tab in Word.

Paul_Spence
Автор

Andrew, thank you so much for your content! You're seriously a life saver.

I'm running into an additional issue on this: I'm able to populate one "repeating section content control" using the Populate a Microsoft Word Template action. However, I have two tables that I'm trying to populate using two separate "repeating section content control" actions, but the Microsoft Word Template action is not detecting the second repeating section.

Have you been able to populate multiple repeating section content controls using power automate? If you could provide some guidance, it would allow for some very comprehensive word reports to be generated.

Thank you.

ashkaanmoinzadeh
Автор

Great video! How can I remove the tags that still appears in the destination file after being populated. I want to edit the content further and these tags and populated content seems hindering. Any suggestions? Thanks

SushilPandey-dqp
Автор

It's like we work on the same stuff. I want to use the collection i create from colXXXX.attachments as the repeating section source? Havent used automate much...yet.... Many thanks for all this effort.

JPPVCC
Автор

Hey Andrew

I a not able to mark the whole table and the properties do not show up blank so i can not add the start and end tag. Plus the table does not show up in the populate word template action. i only have my tags in the action and can add the dyamic content to it. plus it is not possible to open the app because it thows errors saying: word found unreadable content. any ideas?

markusfranz
Автор

Is it possible to transpose the data in Microsoft word. So that I have the Headers on the left and the values on the right? Is there a way to do this?

bluric
Автор

hello! I don't need to copy or archive and edit the copy? Is this because in case some people execute the flow could cause a problem, or not?

Henriquez
Автор

Can the names be different in the word table and SharePoint? Does this create hickups in Automate?

thomasschnooboord
Автор

Hi Andrew,
How can I do this for just One Item. I have a table with 4 doctors, with 4 different addresses and phone numbers. I want to use a form to select the doctor and the Word template be updated automatically with the correct address and phone number in the template. How can I do this dynamically? I want to have the list or Excel file be the source of truth for the information, so when the templates are used, they pull the data from the list/Excel spreadsheet for the header as needed.

buildinglegacywithderricka
Автор

How do you populate repeating sections inside repeating sections (like an array inside and array) ?
[
{
"PortfolioName": "Portfolio A",
"Projects": [
{ "ProjectName": "Project 1" },
{ "ProjectName": "Project 2" },
{ "ProjectName": "Project 3" }
]
},
{
"PortfolioName": "Portfolio B",
"Projects": [
{ "ProjectName": "Project 4" },
{ "ProjectName": "Project 5" }
]
}
]

Word seems to allow it, buy Power Automate doesn't recognize the embedded repeating section

ThreeDigitIQ
Автор

Is it possible to insert repeating images? I have images posted as a list attachment and convert those to base64.

enakomiya