How to Populate a Word Document with MS Forms Responses in Power Automate

Cloudmersive
5 min readJan 8, 2025

--

MS Forms is an increasingly popular survey & questionnaire tool for enterprises, small businesses, and academic institutions alike. When we need to quickly gather responses to any unique set of questions, we can simply email a Forms link to dozens of potential responders.

How we deal with those responses is another question entirely — and the possibilities are vast. MS Forms automatically produces a downloadable Excel spreadsheet containing organized survey response information, but we don’t have to stick to that type of information structure if we have other ideas in mind.

In Power Automate, we can leverage the built-in MS Forms connector to collect response data and process that information in a variety of downstream flow actions. We can, for example, pass MS Forms content directly into the body of a MS Word document, replacing pre-set placeholder strings along the way. We can even convert that Word document to PDF when we’re done.

Populate a Word Document with MS Forms Survey Responses

In this article, we’ll learn how to populate a Word document with responses from an MS Forms survey in Power Automate. We’ll use the MS Forms connector to gather our responses, and we’ll then use the Cloudmersive Document Conversion connector to replace placeholder strings in a template Word document.

We’ll use a basic Client Intake survey form as our example (shown below).

We’ll fill the following Word document with survey responses.

We’ll start by creating an Automated cloud flow in Power Automate. We’ll pick the option to trigger our flow When a new response is submitted.

To begin, we’ll configure our trigger action to react any time our Client Intake survey is completed.

Next, we’ll add the Get response details action from the MS Forms connector into our flow.

We’ll select our Client Intake form from the initial dropdown once again, and we’ll then use the Response Id from our trigger step to satisfy the second parameter.

At this point, we’ve pulled response content from our Client Intake survey into our flow. Soon, we can begin processing that response content in subsequent flow actions.

Before we start populating our template Word document, we’ll first need to bring that document content into our flow. To do that, we’ll use a Get file content action.

We’ll now incorporate our Word string replacement action.

To find it, we’ll search the Power Automate connector library for Cloudmersive connectors, and we’ll locate the Cloudmersive Document Conversion connector (this has a green logo).

We’ll click “See more” to view the full actions list, and from there, we’ll CTRL+F search for an action titled Replace string in Word DOCX document.

Upon selecting this action, we’ll create our Cloudmersive Document Conversion connection. To do that, we’ll need a Cloudmersive API key, and we can get one for free by creating a free account on the Cloudmersive website (this will allow a limit of 800 API calls every month with zero commitment).

Once we’ve created our connection, we’ll click “Show all” to view our request parameters.

We’ll first pass our survey template document file bytes into the ReqConfig/InputFileBytes parameter. After that, we’ll determine if our string match should be case sensitive (this is, in all likelihood, unnecessary), and we’ll then direct our first Client Intake survey response to replace our first survey template document placeholder string.

Since we’re dealing with three survey responses in this example, we’ll create two additional Replace string actions in our flow and configure those to capture our remaining two responses.

Each new Replace string action should take OutputContent (file bytes) from the prior Replace string action to ensure the resulting document contains all three responses.

Now we’ll add a Create file action to generate a completed iteration of our survey template document. We can name this document dynamically if we’d like (for example, by using the responder email & timestamp).

We’ll now save our flow and run a test.

To test any automated flow, we’ll need to perform the trigger action — and that means briefly filling out our survey with example responses.

When our flow finishes running, we can review our newly completed Client Intake document.

Just like that, we’ve dynamically filled our survey template document and generated a client-specific intake form.

We can use the Replace string action in dozens of similar flows!

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet