By using the Word Online (Business) connector for Power Automate, you can create documents using the information collected within a Microsoft Form response. Beginning with a Microsoft Word template, you can use the connector in a flow to take inputs from a form submission, populate them in a template, and save the document.
In a previous post, I have shown something similar using Power Virtual Agents as the information source. In this post, a response submitted to a Microsoft Form will be the source.
Here, we’ll take a look at how you can use Microsoft Forms to collect these inputs and create the document.
1. Create a Microsoft Word template
You will first need to create a template in Microsoft Word for the document you want to generate. In my example, I am using an NDA template. Throughout the document, I have used the Developer tab in Microsoft Word to insert controls. These correspond to the places I want my inputs from Microsoft Forms populated.
For example, if I wanted to populate the Jurisdiction field in my NDA, I would place my cursor in the location of the document, then click on the plain text control from the Developer tab.
Then, click on Properties.
You can enter in a Title for the control so that it is easy to identify, as well as set the Show as to Start/End Tag.
Your template will need to be stored in an online location in order to use it in Power Automate. This could be OneDrive or SharePoint. This this example, it will be stored in OneDrive.
2. Create your Microsoft Form
Go to https://forms.microsoft.com and sign in with your work account (if not already). Create the form you want to use. You can see in my form below, the questions correspond to a control on the Word template that needs to be populated.
My questions include: What is the permitted purpose?, What is the Governing Law?, What is the Term?.
3. Create the flow
This is what the end result of the flow looks like. If you stored your file in SharePoint, you would use the SharePoint connector rather than OneDrive.
Go to https://make.powerautomate.com/.
Go to My flows >+New flow > Automated cloud flow. Give the flow a name, and select the Microsoft Forms trigger, When a new response is submitted. Click Create.
In the trigger action, select your form in the Form Id field. Add a step below- Microsoft Forms Get response details. Select your form name in the Form Id field. In Response Id, select Response Id from the dynamic content list.
Insert the Word Online step, Populate a Microsoft Word template. Your location, document library and file would direct you to where the file is located. Since mine was in the OneDrive folder called Legal Documents, I’ve made the selections below. Once it is pointing to the Word template, the action will show you the controls from your template. Here, use the dynamic content from Microsoft Forms (i.e. your questions) to insert the responses in the right place.
The next step is optional. I’ve inserted the step Current time, just so I can have a unique value used for the name of the document being created. If the file name isn’t unique, you will get an error when your flow runs. This is the Date Time connector- Current time.
Add in the OneDrive for Business action, Create file. If you want to store the file in SharePoint instead, use the SharePoint action- Create file. This is where you are specifying the location for the newly created document to be stored. You will also enter in a name for the document. Use the dropdown arrow and folder button to specify the location. For my file name, I have used dynamic content from the current time. Make sure to type in .docx at the end of your file name. For File Content, insert the dynamic content Microsoft Word document from the Word online step.
At this point, the actions to create the file are complete. Save and test your flow. Test your flow by submitting a response to your Form, then navigate to the file storage location to see it appear.
5 thoughts on “Generate documents with information collected from Microsoft Forms”
I dont seem to find the Word Online plugin, has it been removed?
It should still be there. Some organisations block certain connectors though, perhaps that’s why it’s missing for you
I finally found it, it was hidden so I had to “drag” the window area to find it. However, the flow runs but the data is not added in the template. Any ideas? Get this message from the flow:
“Cache-Control”: “no-store, no-cache”,
“Strict-Transport-Security”: “max-age=31536000; includeSubDomains”,
“Date”: “Wed, 19 Oct 2022 12:47:51 GMT”,
Status code 200.
From my experience, it looks like I would need PowerAutomate with RPA to complete this flow. The person completing the form wouldn’t need to have PowerAutomate, correct?
Hi Bailey- No RPA is needed for this since it only uses cloud connectors (MS Forms). The person completing the form doesn’t need Power Automate either