How to Create a Word Document From a Template in Power Automate?

While working on the Power Automate travel request application, I got a requirement where I have a Word document template that needs to be filled with specific data from a SharePoint list.

The goal was automatically generating a Word document from this template whenever a new travel request is submitted. The template would automatically populate with details like the employee’s name, travel dates, destination, and approval status.

Create a Word Document From a Template in Power Automate

Before creating the flow, we need to create the template using Microsoft Word.

Now, I will tell you how to create a simple template, but you can use a predefined template or create your own.

Enable Developer option in Microsoft Word

Here, we create a Microsoft template using Developer tools in the MS Word desktop app to ensure your MS Word developer option is enabled. If not, follow the below steps:

1. Open the MS Word application. Navigate to the “File” tab and click “Options.”

Power Automate generate word document from sharepoint list

2. Click the “Customize Ribbon” tab and enable the Developer option. Then click OK.

populate word power automate

Then, you can see the Developer tab in the MS Word-like below screenshot.

power automate word template

Create a template in Microsoft Word

For this example, I am creating a simple Employee Travel Request example like the below screenshot:

power automate word document generation

Using the Developer tab, I will add the Plain Text Content Control, where I can provide dynamic data using Power Automate. To do this, follow the below steps:

1. Place the cursor where you want to insert the control. Then, go to the Developer tab, and under Controls, click ‘Plain Text Content Control.’

Power Automate create word document from template

2. Next, a text box will appear. You can give it a sample name, then click on ‘Properties’ within the Controls section.

Microsoft flow create word document from template

3. Then, ensure each control you add to the Word document has a unique title. In my case, I give it trEmpName and click OK.

create word document from template using Power Automate

4. Similarly, add the Control where you want to put the dynamic values.

create word document from template in Power Automate

Once your template is created, upload it to the SharePoint library for accessibility.

Power automate create a word document from template

I created a SharePoint list for the flow, as shown in the screenshot below.

power automate populate word template without premium

Now we start creating the flow:

1. Navigate to the Power Automate Home page, click + Create, select the Automated cloud flow, provide the flow name, choose the flow trigger (When an item is created), and click the Create button. Then, Provide the Site Address and List Name inside the trigger.

How Power automate create word document from template

2. Then, we will read the Microsoft Word template to fill the template fields with selected dynamic values to generate a Word document. So, select the Populate a Microsoft Word Document action which you need a premium license.

Then provide the below parameter:

  • Location: Select the SharePoint site from the drop-down.
  • Document Library: Select the SharePoint Library Name from the drop-down.
  • File: Select the Word document template.

Then, click Show all to display the advanced parameters.

  • trManagerApprovar: Provide from dynamic content.
  • trTraDate: Provide from dynamic content.
  • trEmpName: Provide from dynamic content.
  • trDestination: Provide from dynamic content.
  • trPurposeOfTravel: Provide from dynamic content.
create word document from template in MS Flow

3. we will create a Word document from the template so that I can add the Create File action with the site address, folder path, file name, and File content from the dynamic content parameter.

create word document from template power automate

Once the Flow is ready, we will run the Flow.

Run the Flow to Create a Word Document From a Template

Now, it’s time to save the flow. Click on Test -> Select Manually. At this step, add an item to the SharePoint list.

create word document from template using MS Flow

A Word document will be created from the template using Power Automate when the flow runs successfully.

create word document from template using Microsoft Flow

When you open the Word document, you can see that the template is filled with SharePoint list values.

Create a Word Document From a Template in Power Automate

I used this template for this example. You can customize the template further based on your specific requirements.

Advantages:

  • Automates the document creation process, so you don’t have to do it manually.
  • Power Automate document generation within the Microsoft ecosystem makes it accessible and user-friendly. 

Limitations:

  • Requires a premium connector in Power Automate, which may increase subscription costs.
  • Changes to the template require updates in the flow, which can take more time for business users.

I hope you follow all the steps in this flow, which will help automate the creation of travel request documents.

Also, you may like some more Power Automate tutorials:

  • Can you provide the steps you used at the beginning to “create a word template of invitation…by using Developer tools in MS Word desktop app”? What developer tool allows you to add a custom field?

  • >

    Build a High-Performance Project Management Site in SharePoint Online

    User registration Power Apps canvas app

    DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

    Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

    Power Platform Tutorial FREE PDF Download

    FREE Power Platform Tutorial PDF

    Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…