Fill a Word template from a SharePoint list
Short answer: build a Word template with content controls, save it in a SharePoint or OneDrive document library, then use the Populate a Microsoft Word template action in Power Automate to fill each control with a value from a list item. Microsoft's connector page lists that action as Premium in Power Automate, so check with your admin before you plan around it.
What this does
A list holds the facts: a client, a date, an amount, a few lines of scope. A letter, quote or work order needs those same facts in a Word file. Typing them twice wastes time and causes mistakes. The Populate action reads a Word template and fills its fields to make a new Word document. Microsoft describes it this way: "Reads a Microsoft Word template to then fill the template fields with selected dynamic values to generate a Word Document."
Before you start
You need three things:
- A SharePoint list with the data. Use the Title column for the main name of each item, such as "Quote for Client 12". The Title column is required by default. You can rename it or turn off Require. See "Rename or hide the Title column in a SharePoint list".
- A Word template saved in a document library. Microsoft says to save it to "one of the document libraries supported by Microsoft Graph: OneDrive for Business, SharePoint Sites, and Office 365 Groups."
- A flow at https://make.powerautomate.com with a premium license, or a plan to use another route (see below).
Step 1. Build the template in Word
Microsoft says you can build templates "on either Windows or your Mac by enabling the Developer tab." Exact names may differ in your version of Word. Microsoft's page also lists these limits:
- "Developer tab is not available on Word online"
- "Template creation in Word for Mac is not supported."
So plan to build the template in Word on Windows. The same page says "Use the control Properties to give the control a friendly name that you will use in the Power Automate."
Supported controls, from Microsoft's list:
- Plain Text Content Control
- Combo Box Content Control
- Drop-Down List Content Control
- Image Content Control
- Repeating Section Content Control
Not supported, from Microsoft's list: Rich Text, Building Block Gallery, Date Picker, Check Box and legacy form controls. If you want a date in the letter, one way to start is a Plain Text control and send the date as text. Our advice, not a Microsoft rule: format the date in the flow before you send it, so the letter reads the way you want.
Two more rules from the page: "Content controller names within the document template have to be unique" and the maximum size of the input file is 10MB.
Step 2. Save the template
Put the finished .docx in a document library that your flow account can read. Keep the template in its own folder with a clear name, such as Templates. Our advice, not a Microsoft rule: keep generated files in a different folder so nobody edits the template by mistake.
Step 3. Build the flow
- Open https://make.powerautomate.com and create a new automated flow.
- Use a SharePoint trigger such as "When an item is created". Pick your site and list.
- Add the action Populate a Microsoft Word template. Choose the Location, the Document Library and the File. Microsoft says that when you select the file "you should see a list of all the controls that you added."
- Click each field and pick the matching value from the trigger, such as the Title. For a Choice column, the value is the choice text with its number prefix, for example "1 Active".
- Add the next action. Microsoft says "you can then use the outputs of the action and send an email, save the document to another location, or any number of other actions."
If the trigger is "When an item is created or modified" and a later step updates the same item, the flow can trigger itself. Add a guard condition and read "Power Automate flow keeps running itself over and over".
Step 4. Save the new file and wait
The output is a Word file. Add a Create file action in SharePoint or OneDrive to store it, and give it a name built from the Title. Microsoft's known-issues list says: "When using the file created from this connector, adding a small delay (~1min) would ensure the file is available in follow up actions." If you email the file, see "My flow email goes out without the attachment".
Repeating rows, such as line items
For a table of items, Microsoft says to add a table, select the full row you want to repeat, and choose the repeat content control from the Developer tab. Put plain text controls inside the row. Microsoft says: "While adding the nested content controllers, make sure to go to properties and add a unique title for them." When the number of rows changes, Microsoft says to pass an array. Microsoft's example looks like this: [{"a": "value for row 1", "b": "value for row 1"}, {"a": "value for row 2", "b": "value for row 2"}]. The keys are the titles of the nested controls. Microsoft says the array can be built with the Select data operation.
The line items must come from somewhere. One way to start is a second SharePoint list that holds one row per line item, linked to the main item. Getting those rows needs a Get items action with Top Count and Pagination set. Get items returns 100 rows by default. You can raise Top Count up to 5,000 and turn Pagination on. See "Power Automate Get items stops at 100 rows: how to get them all".
Images
Microsoft says to add an Image content control, keep the placeholder image, and give it a title. The value should be a base64 JPG or PNG with a content type. Microsoft also says "Images uploaded using Populate a Microsoft Word template does not automatically resize to its aspect ratio." The image takes the size of the control you set in the template. Images are not supported inside headers.
Limits from Microsoft's page
- "Documents must be able to convert in less than 2 minutes or the request will time out."
- "If a Multi-factor Authentication (MFA) conditional access policy is enabled, the Populate a Microsoft Word template action cannot be used."
- "Nested image content controllers are not supported."
- The page lists API calls per connection at 100 per 60 seconds.
- Generated files: "Content controls will be locked for editing, greyed out and spelling checks in Word desktop application for files generated using Populate a Microsoft Word template action." Microsoft gives a workaround: when you add a control, double-click it, remove the existing text and type the display text you want. Microsoft says this lets people edit the generated document.
If your connection expires, see "Flow fails because the connection expired: how to fix it".
Without the Populate action
Microsoft's connector page lists the Populate action as Premium for Power Automate. A premium connector needs a license that includes it. Check with your admin for what your plan covers. If it is not covered, here are two ways to start. Both are our advice, not a Microsoft rule:
- Put the facts in an email body. Build the text in a Send an email action using the list values. For many requests (a confirmation, a short notice) an email is enough.
- Keep the facts in the list and share a filtered view. If people only need to read the data, a document may not be needed.
Neither route makes a formatted Word letter. If you need that, you need the Populate action or a build by someone who can set it up.
What to avoid
- Do not use unsupported controls such as Date Picker or Check Box. Microsoft lists them as not supported.
- Do not reuse the same title on two controls. Microsoft says both will get the same content.
- Do not leave a nested repeat control without a title. Microsoft says it gets a random title.
- Do not build the template in Word on the web or on a Mac. Microsoft says neither is supported for template creation.
- Do not save generated files over the template.
- Do not send a Choice value without its number prefix if you filter on it later. Use "1 Active", not "Active".
- Do not trust a green run without opening the new file once.
Test it
- Create one test item with short text, a long text and a row with many characters.
- Run the flow and open the new Word file. Check each field, the table rows and the image.
- Edit the item again and check what the flow does. If the file is created twice, add a guard.
- Open the file in Word desktop and try to edit a field. Microsoft says the controls are locked unless you used the workaround above.
When to get help
You can build all of this yourself in Microsoft 365. If you would rather have it built and tested for your team, I do that. A tracker like this is a fixed price: $5,000 for one, built in 2 weeks. See "What a SharePoint tracker costs to build". Bring one example of the problem to a free call.
I am Al Davies. I run 250 High Street LLC and build SharePoint trackers and Power Automate flows for operations teams. I work remotely. The first call is free, and I will not try to sell you anything.
See trackers I built: Tools I built
FAQ
Is Populate a Microsoft Word template a premium action?
Microsoft's connector page lists the Word Online (Business) connector as Premium for Power Automate. Check with your admin for what your plan covers.
Can I use a Date Picker or Check Box control?
No. Microsoft lists both as unsupported. Use a Plain Text control and send the value as text.
Can I build the template in Word on the web?
Microsoft says the Developer tab is not available on Word online and template creation in Word for Mac is not supported. Use Word on Windows.
How do I fill a table with a changing number of rows?
Use a Repeating Section control around a table row, give each nested control a unique title, and pass an array whose keys match those titles. Microsoft says the Select data operation can build the array.
Why does my flow fail when MFA is on?
Microsoft says that if a Multi-factor Authentication conditional access policy is enabled, the Populate action cannot be used. Ask your admin.