Create Word documents from SharePoint list in Power Automate

In this article, we’ll show how to generate MS Word documents from a SharePoint list with the help of Processes in Power Automate Flow. You will learn how to insert SharePoint list data into DOCX documents automatically.

Processes are a Plumsail Documents feature with an intuitive interface for creating documents from templates.

Let’s see how to populate Word documents from SharePoint in Power Automate (Microsoft Flow).

Configure the Process

First, we will set up a document generation process that will create Word documents from a SharePoint list for us.

For that, add a new process inside your Plumsail account.

To follow the steps from this guide, select Start from blank.

add process button

You will see options for template formats. Set the Process name. Select DOCX for the template type and click Next.

generate Word documents from SP list

Configure a template

After creating the process, go to the next step – Configure Template.

It includes two substeps:

  • Editor;

  • Settings.

In Editor, you can compose a template from scratch, upload your own, or use our library of free templates, and modify them online for your needs.

You can download a template from our example here :

Docx template

Then upload it to the process.

upload template file

Templating syntax

Plumsail Word DOCX templates use its own templating language.

In short, the templating engine thinks that everything between curly {{ }} brackets is variables where it will apply your specified data. Read this article to get familiar with the templating engine.

Test template

You can test a template as well, to see how it will look at the end. After clicking the Test template button, you’ll need to fill in the auto-generated testing form. Fields of this form are created based on tokens from your document template. You can change the default form as well.

test template button

By filling out the form and clicking the Test & Preview button, you will open the test file in your browser. You can also choose to download the result document to your computer.

test template

After testing, return to the editor and click Save & Next.

Setup output file

Now we need to configure the output document. To do this, we will do the following:

  • Switch to Production mode to remove Plumsail watermarks from resulting documents

  • Fill in the name of the result file

  • Select DOCX format for the output file and click Save & Next

Configure template

Delivery

The next step is delivery. We’ll share the resulting DOCX file in a Microsoft Teams channel.

To use the delivery you need to install Plumsail Documents app for Microsoft Teams.

After that, select Microsoft Teams delivery in the list of deliveries.

Click Connect to Microsoft Teams.

Configure delivery

Once you’re connected, you will see the Teams delivery settings:

Configure delivery

Select the Team, Channel and fill in the Message field. Click the “Save and Next” button to save the delivery settings and move on.

Start the Process

We will start our Process from Power Automate (Microsoft Flow).

Create a Flow

This is how our Flow looks:

docx from sharepoint list

Check out the Flow steps.

Flow trigger

We need to start the Flow every time an item is created in the SharePoint list. For that, search for SharePoint in Power Automate and set SharePoint-When an item is created as a trigger. You’ll need to select the SharePoint site and the List.

Flow trigger

Start document generation process

This is the action from Plumsail Documents connector. You can find more information about this action by visiting this page.

Using the action for the first time, you’ll be asked for Connection Name and Access Key.

create flow connection

You can type any name for the connection. For example, Plumsail Documents.

Then create an API key in your Plumsail Account page, copy and paste it to Access Key field.

The action has two parameters:

  • Process name. Select the process you need from available ones.

  • Template data. Map data with the dynamic output from the SharePoint trigger.

start generation documents action
Dynamic content

All in all, it works this way: the flow waits when a new item is created in the SharePoint list, then it takes dynamic content from the trigger and merges SharePoint data into a Word document.

The result looks like this:

Result

Conclusion

It’s very simple to automize creating Word DOCX documents using Microsoft Power Automate and Plumsail Documents.

Of course, it’s possible to generate more complex documents even collecting data from several lists.

If you’re new to Plumsail Documents, register an account to get a free 30-day trial.