Populate a Word Template with Power Automate | How to Tutorial
HTML-код
- Опубликовано: 14 май 2024
- In this step-by-step tutorial, learn how to dynamically populate a Microsoft Word template using Power Automate. This powerful automation can be leveraged in various scenarios for document generation like Invoices, Proposals, Onboarding, etc. Video showcases how to generate word document for certificates of participation for courses.
Follow along as I guide you through the process of creating a Word template, incorporating content controls for both text and images. Harness the full potential of Power Automate to dynamically fill the template with data sourced from a SharePoint list. Additionally, discover how to send the generated word document as an email attachment to the user or save the document to your data source.
Please note that a premium license is required to utilize the Word Online (Business) connector in Power Automate.
Documentation: learn.microsoft.com/en-us/con...
⬇️ Download word template and Power Automate flow ➡️ link in Community Tab for Channel Members (Silver Club 🥈 or higher)
#powerautomate #microsoft #microsoftword #sharepoint
0:00 Introduction to Populating Word Templates with Power Automate
0:38 Create Microsoft Word Template with content controls
4:30 Populate Word Template with Power Automate
9:17 Generate Word Document from SharePoint List data - Наука
I think you might be psychic. Every time I wonder if I can do something you drop exactly the right video.
I read minds :)
I was thinking the same!!! Went to his channel and Boom! It was there :) I like the flow of Reza's tutorials. Very well done!
I know you have been doing this for a while but when you go through these without missing syntax or a "" or curly brace is impressive! always so clear and concise
Thanks
You are the best at these videos Reza! Thank you for all the time and effort you put into making them.
Thank You Gina
Great video Reza! Appreciate it. Very clean execution and explanation. I did the first part with a Power BI trigger and worked beautifully. Much thanks!
Glad it helped!
You make it look soooooo simple and easy to do. I've done this sometime in the past but watched it as if it was my first time watching this feature so I can learn something and wasn't disappointed at all. Thanks for sharing.
Thanks so much!
There is always something new to learn.
You're right!!
Another great one Reza. Thanks!
Awesome!
Nice video tutorial. Thanks for sharing
Most welcome
This one is fantastic! Thank you!
You're very welcome!
The trick with the compose is super smart. Thank you Reza
Most welcome!
Thanks sir for another helpful video!
Most welcome!
Thank you Reza, very informative videos and enables power apps champion to solve day to day challenges
Most welcome
Thanks Reza, for this most usefull video..🎉❤
Always welcome
amazingly well done video!
Thank You
What would be really interesting is creating tables in Word with repeating sections. You intimated that it could be done in your chapter on building the Word template, but I'd be keen to see it working in practice...
Thats a planned video 😉
Thanks for the demo reza, it would be very helpful if you can also make video on dynamicFileSchema when user dynamically selects docx file from the document library. 😊
Let’s see the response to this video.
I have plans to do more videos with this connector in future.
Thank you reza ,it is amazing shot ,i wish it was not premium one , currently i have a purchase request form being printed through HTMl document using flow
Premium offers most value. I have done videos with HTML technique as well.
Thank you Reza for continuing to publish content building with the Classic designer.
I covered both modern and classic 😉
@@RezaDorrani yes, many thanks for still covering the classic 😉
Uggg true. That new design is awful
Thanks Reza!
Welcome!
Hi Reza, Great video! Really appreciate it! I've followed your flow and it works! But do you know why the attachment in the email appears not in a Word document? I need to download the attachment first and then open the Word document.
Attachment in email is the word doc as shown in video.
Thank you Reza :) Is there any video in your planned to create PowerApps about project planner that show in Gantt chart / Time line view ? (Thanks again for multiple valuable video :) )
Most welcome!
Planned - Yes, but priority will be based on demand.
Thank you for sharing this Reza! I always wondered why “File Identifier” did not work when I used the same exact text from Environment Variables... Though it seems I forgot “encodeUriComponent” part 🤦🏻♂️
Most welcome
Very useful Reza jan. I use this method to generate a Word document by entering data in a PowerApps form but didn't know why to remove the double quotes in the attachment.
Glad it helped!
Thank you for this .I need one more help ,how to get the signature image file from dataverse .
I have not tried with getting file content from Dataverse so not sure.
Thank you @Reza for such a wonderful video. Have been waiting for such a video for a long time. I see that the certificate is being triggered manually for every item in the 2nd half. Wanted to check if we can generate the same for a big list all at once. Will this mean we have to Apply to each to get a lot of info dynamically onto the certificate? I have a use case for at least 150 such instances each month and hence want to build something dynamic in nature.
Yes, correct. You can run the actions in a loop.
Super. Thank you @@RezaDorrani
Yet another great one. I can't thank you enough. BTW, is it possible to merge different word files in one consolidated file leveraging power automate (without using third-party connectors)?
Thanks.
I have not tried merging docs so not sure about the options.
Hi you make great video, is it possible to use a fingerprint reader on a powerapps application, it would be cool thanks
I am not sure about fingerprinting.
Thank you! Does this approach also work with PPTs?
Not with PPT
Thanks for the video. very informative. can certificate be in pdf format?
Most welcome!
The word connector also has a convert to pdf action.
Superb useful use case . Any plans to make videos on PowerBI too?
No plans on power bi
thx. will this work if I do the reverse where I have a word doc and use dynamic fields to populate a sharepoint list?
Not sure about options for reverse as I have not come across it in a project scenario
@RezaDorrani thx. trying to grep a summary section of a word doc to populate a sharepoint list column. I will try it out and report back if this works. thx for idea again
Great information! Can this be done without the Premium Connectors? I did follow your tutorial on Power Apps to PDF; however, it appears the experimental version does not allow the use of shapes, lines, etc. in creation of a PDF. For that reason, Word would appear to be a better option.
Thanks Randy.
Im not aware of any workarounds with standard licensing.
Wow!! very impressed As ask you last time about PDF signature. I got some idea
but in case of populate on PDF directly (Make some template on PDF) Is it have any solution for it?
Thank you so much
You can always convert word to pdf.
Check ruclips.net/video/KVnfWsO1Fhs/видео.html
Hi Reza
Another splendid video. If I'm being fussy though, I would think that it would be better to have to generated document save to a document library. Adding attachments to SharePoint list items just never feels right for me. 😎
I try and mix and match in my videos. I have done videos saving files to libraries so thought of saving one as attachments. As I said in video, you can save it wherever you want 😉
Present sir❤
Thanks
@@RezaDorrani please upload a video on powerautomate crud operations as well
@@Sreekanth297
@@Sreekanth297 I make videos when I receive multiple requests on a topic. Every 6 months I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.
Great video. Thanks @Reza
I have created an App (PowerApps), the App has a collection in which I am trying to parse the data and then populate a repeatable section in Populate a Word online template. Unfortunately, the repeatable section is not working, and I would appreciate it if you could make on video on this. Any advise also will be great.
I have a video planned on repeating section.
I am awaiting the overall response to this video to know if it’s worth building a follow up video.
@@RezaDorrani This video was truly amazing. You are the best Microsoft MVP.
@@nitinchamroo5748 Thanks!
Thanks for the video.. Please How do you implement with HTML tags?
Rich text is not a supported control
Perfect Timing for this video! I'm hope to order this premium connector soon. Can the file be renamed and saved to SharePoint after it is generated by selecting "Create File" in Sharepoint action, then putting the template as the body of the file?
Thanks!
Best to rename the file prior to creating file in SharePoint
@@RezaDorrani okay, thank you!
@@RezaDorrani can you make the file name dynamic to match a field in the document to be able to easily identify who the docs are for?
@@thatonepixel5578 possible
Hi Reza, Thanks for sharing this video. I am working on building something similar to this but I have two templates based on the user selection and have multiple pages which then convert to PDF and merge into one PDF file. It is working fine but the issue that I am facing is the page number for the templates. Is there any way to populate the page numbers when we merge the documents?
Welcome!
I have not tried merging documents or pages hence not sure.
Hi Reza,
Can you do a video regarding Populate a word document from power apps if I click on icon in power apps the word document will be generated within word document there are some tables and color coding for that tables.
If u do this it will be very helpful...
Thanks
Hey, I just did a 2nd video which shows populating Tables.
You can easily call that flow from power apps.
Im working on other video ideas now and have no plans on this topic.
Hi Reza, this is really good content. Can we do something similar in power point?
Thanks!
There is no out of the box action like word for PowerPoint
Hi Reza, do you have a work around flow for populating a word doc based on SharePoint List column values? It seems Populate MS Word Template is a premium connector?
I do not have a workaround reference
Very nice. I just used this feature last week to create a label based on Sharepoint List inputs for our one of our Groups. Thankfully I had already been granted Premium Features by our IT Group so that I could use it. Only issue was sharing the Power Automate Flow in a Power App so that others can run it who didn't have Premium Licenses, so I chose to have folks run the Flow as Me. Hopefully that's not an issue with the Microsoft folks. However, it may cause an issue if I have to leave the organization for whatever reason. Someone else would probably have to take over the Automate Flow that also has Premium.
I did notice that Premium didn't show up on the Office 365 Example, the first one. Is it not a Premium feature there?
If flow is triggered from power apps, the premium license need falls on power apps which means every user running the app will need a premium power apps license.
Office 365 example first one? which one?
@@RezaDorrani I had someone without a license test, and they were able to run the power automate flow without an issue.
The first example. When you were in Office 365, when you searched Word, Word Online (Business) pops up and the Populate a Word Template doesn't have Premium next to it like in the Sharepoint example.
@@ed-salinas-97 They may have been assigned a trial license or auto claim.
Word connector is a premium connector (new flow designer does not show that)
@@RezaDorrani Ah, okay. I haven't transitioned to the new Flow Designer yet. Not ready for a change right now. Ha ha!
Do you have a video showing this when using word on a Apple Mac?
No
thanks! any luck with populated rich text?
Welcome!
Rich text is not supported as per documentation
What was the reason for removing the Quotes when attaching file in email? I have an issue with the output file that is attached keeping the text fields in the file. Only trick that seems to have worked is to convert to pdf then back to word using adobe connector and attaching that file. Thoughts?
The new designer adds that quotes. The content bytes expects the file blob and not the info in quotes which means a string.
I have not come across any issues so not sure about the reason or fix for your issue.
i love classic designer
Ok
What if the source field to populate the word document is multiline long text with rich text? It converts things like ** to bold and ## to header format.
How do we get this to display correctly on our word document?
Populate word template does not support rich text. Check documentation for unsupported controls.
Hello Reza, i was wondering ...
1) can a repeating section from a Word doc. be populated/connected with SP multi-line-flattext-field-json/metadata without premium connector?
2)I was searching for a way to fill a power apps SP-form invoice with parent and a child repeating table data that would be stored in a multilinetextfield from the parent list or library and send a pdf with signature fields on the bottom to be signed with a certificate. Is that possible or do I have to use Adobe Sign or do you have a other solution?
I have not explored any option without premium connector so not sure
Hi Reza, Can we able to create a Custom Template using Power Apps (Dynamically have number of word pages and placeholders/columns)
Not create a template, just populating it
hi Reza, How can we populate the word template based on conditional controls, for example i want a certain to field to populate if the value is greater than 50000 or dont want to show a complete row in word if a certain value is blank
Thats not an option. You would have to set all the controls in template and only set it when needed based on your conditions.
Thanks Reza , but the populate to word is premium connector ?
Yes
Some more usecase of copilot powerapps/powerautomate will help if you can make videos on that
Let’s see. I have a lot of videos planned. Week by week Il release them.
Hello, can dynamic tables be generated with a non-premium flow? (FROM CHILE ! )
I have not investigated on non-premium options
Any work around for uploading more than 1 image to a word template without 3rd party connectors ?
Video shows adding 2 images in word template
Is it possible to insert multiple images with just one placeholder? Example, I’m using the images attached to a sharepoint list and I want them to be placed in the word document.
Not with one placeholder. The limitation is called out in the documentation.
Is it possible to use microsoft forms responses to autopopulate forms?
Yes
I would like to download this template and flow. is the link still valid? Great video btw. As usual.
Thanks so much.
Links are available in community tab. Respond to the thread for this video on community tab and if link is not open, Il share an updated one
Hello Raza, here in Korea we learned a lot of knowledge the power apps from you. I appreciate. May I ask you a question?
In this video, I realize the population word function is premium meaning that I have to purchase. Am I correct?
Thanks so much.
Yes, word connector is premium and license will be needed.
Thank you for your answer.
Sorry but May I ask you one more question?
If I buy a premium license for this and develop a program after that deploy it to the 200 users. Does it work for 200 users without premium license?
@@user-br4hb9nj6r Every user running the flow will need the license. The trigger of the flow will play an important role.
Understood!! Thanks so much!
Any solution to handle rich text? Thanks!
Rich text control is not supported
Will it work for updating tables?
updating tables? You mean inserting table data in word.
Yes, there is a repeating table section control.
Wow, those quotation marks around the dynamic content for content bytes really had me in a stranglehold for the last week lol. It's so annoying that the solution was something so small! lol
As long as it works
If we have a checkbox in the word documnent and when it's yes in sharepoint that need to also tick in the word .How can we do that ?
learn.microsoft.com/en-us/connectors/wordonlinebusiness/#known-issues-and-limitations
Hey Reza, can you do the same but with repating images from the image field in a sharepoint list please 😇
Repeating section content control does not support images.
@@RezaDorrani i learned that the hard way 2 years ago. hoped it was better now but seen your reaction its not 😔
@@WaaaghNL Its not a feature yet
Hi! How do I show my flow from the sharepoint Automate button? I have done this but I don't see the "Generate certificate" in the Automate menu. Thanks!!
Flow must be in default environment for it to show up.
@@RezaDorrani okay got it now. my org is blocking word connection so i'm kinda stuck... 😒😒
Is these feature works only on premium version or normal version itself? Because I tried this but unable to save the flow
Its a premium feature
@@RezaDorrani Thank you for your response
Hi, I am using SharePoint instead of one drive. Also after generating the doc , i still can see the template's content controls properties. How to remove those controls and copy the word doc to new folder in SharePoint? I would like to have a normal doc without content controls. Thanks
Once file is generated, it is a normal doc. Not sure why its not the same for your scenario.
@@RezaDorraniforgot to mention, i am not using word populate option. I just create a new file using the template and update the file properties. Then I am attaching the newly created word doc ( in same template folder ) to email .
@@mmarath2k7 My video is about word populate. Not sure about your scenario.
I would like to save the Word file in OneDrive and then once the file gets updated and it's finished (offline) I would like to update the SharePoint list with the information in Word, do you have a video about something similar?
I do not have a video reference on this scenario
Is it possible?
Not sure
Thanks for your video is really useful :)
Can we ask for a video with that scenario? Word file saved in One Drive to update a SharePoint list?
Can we do from dataverse?
Yes
Hi Reza Dorrani sir,
Good Afternoon!!
I have a list of assets with a column named "Office Location" containing values such as Delhi, Bangalore and Mumbai.
I also have another list named "Roles" which contains two columns: "User" and "Location".
The data Presented shows that for the same user, let's say "Raju" we have different locations such as Delhi, Bangalore, Mumbai and so on.
My requirement is to use a gallery control to display data where the office locations from the assets list match with the locations present in the roles list.
Please give me Answer for my requirement ASAP.
Thanks & Regards,
Sanjam Ugandhar.
I do not have any video references on your requirement. I recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
hey Reza, would it be possible to do something similar with a dataverse ?
Yes
@RezaDorrani - my scenario is that I am trying to keep my Word document in the Dataverse table instead of SPO or OneDrive, but I haven't come up with a solution yet. per the microsoft the 'word to template' action is not supported to work with the Dataverse.
@@enj0i50 Can you show me where in documentation it states that? Share link
@RezaDorrani I am not able to post the a link. RUclips somehow keeps deleting my comments... Please look for a "How to populate word as a template dynamically from the Dataverse?" There is a topic on the Microsoft Power Automate Community. Somebody was looking for the same solution in 2023.
@@enj0i50 Community forums and official Microsoft documentation are 2 different things.
There is no call out of this action not working with a data source. It has nothing to do with a data source as you simply provide it dynamic data, it will generate the doc and you can save it in any data source of your choice.
can we send this Word as a PDF file type ?
Yes!
Il show you in my next video 😉
The Populate a Word Template action is not working for me. I have searched the community forums but to no avail. Thanks for the video, though. In theory, it should work.
It does work :)
Not sure what your issue is related to.
Hi @Reza
Rich text is not working for me, When using a rich text content control.
Its not working for me either as it is not a supported control. Check documentation
@@RezaDorrani yah..it is a limitation. Is there any other way to convert HTML to Word in power automate apart from third party
@@yogeshm8344 I’m not aware of any other way
@@RezaDorrani ok thanks
How to insert line breaks?
I dont think that is supported
Podrías enseñar porfas que también lo convierta en pdf
Coming in my next video
How do I do this step but fill the form via information inputted from a powerapp? So Powerapp > Word Doc ? I am very lost
I do not have a video reference on this scenario and would have to try it out to provide guidance. I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
I wish there was a way to get data OUT of a word document, after you have made the document using it. Like if someone updates it or whatever… be able to pull that back out in json format
Thats a completely different scenario. May be some day in future I may try that.
@@RezaDorrani yea, it looks like you have to unzip the word document and work with the document.xml file… but then you have to do xpath and know what all the tags are to traverse the xml. Looks very complicated from the research ive done thus far.
@@TheCarter117Gaming It will be complex
i have a problem with the image when my document is generated it d'ont show the image and instead i have a message : "Impossible to charge the image" what can i do ?
I have not come across this and hence not sure what the cause could be.
I recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
The problem was that my image was in the header of my word document not sure why that didn’t work but when i used in in the body it worked 👍 thank u for your reply ❤
6:04 But you're manually filling in the template in the flow
Your right. That’s because step 1 was to show how to populate from flow and step 2 (later in video) is how to populate it dynamically.
Thanks Reza. Its a shame Word online action is a premium connector.
There is no shame in being a premium connector as long as it offers value.
Yes there is. It's a Microsoft connector... Why is excel included but word isn't? Why is converting a Word file to PDF within Word (by printing), but is the Word to PDF in P.A. suddenly a Premium?
@@rockabillyron Word connector has been premium since day 1 as far as I know
@@rockabillyron I agree. It is a shame, because organisation is already paying for these apps. Just to connect them we need to pay more.
Is this a free connector?
No
@@RezaDorraniIs there any free solution which can take data from a excel source and update word files and then covert them into multiple PDF files. My organisation don't have a premium licence 😔
@@Vishal-cj8un I am not aware of any
is there a way to generate the word template from data in an excel sheet stored in SharePoint?
Should be possible