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).
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.
You will see options for template formats. Set the Process name. Select DOCX for the template type and click Next.
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 :
Then upload it to the process.
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.
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.
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.
After testing, return to the editor and click Save & Next.
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.
Once you’re connected, you will see the Teams delivery settings:
Select the Team, Channel and fill in the Message field. Click the “Save and Next” button to save the delivery settings and move on.
We will start our Process from Power Automate (Microsoft Flow).
This is how our Flow looks:
Check out the Flow steps.
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.
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.
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.
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:
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.