Convert Microsoft Forms responses to Word or PDF

Modern templating engine

Still using Classic syntax? See the Classic documentation.

Learn the differences.

This article shows how to generate Word or PDF documents from Microsoft Forms responses using Plumsail Documents and Power Automate. You can use this approach to automate certificates, applications, requests, and other documents.

To follow the steps in this article, you need these accounts:

  1. Plumsail Documents

  2. Microsoft Forms

  3. Power Automate

This example uses a DOCX template, generates a PDF file, and saves the result automatically.

If your form includes image uploads, see advanced case.

You can also watch the video below for an overview of the process.

Create Microsoft Form

First, create a Microsoft Form. In this example, we use a guest request form and generate a document from its submission.

If you are new to Microsoft Forms, see how to create a form.

You can also use the form from this example. After you sign in to Microsoft Forms, click this link to duplicate the form.

Microsoft Form

Configure Plumsail Documents Process

Next, go to the Processes section in your Plumsail account and click Add process.

In the list of templates, choose Blank document, select DOCX as the template type, and set the process name.

add new process

Configure Word template

Once the process is created, configure the template.

In the Editor, you can create a template from scratch or upload an existing one. You can edit the uploaded template online or in Word desktop.

You can also download the sample DOCX template used in this example.

Docx template

Then upload the template to the process.

upload template file

Templating syntax

If you create your own template, use DOCX template tokens to insert values from the form. Plumsail Documents uses a simple token syntax inside {{ }}.

Learn more in DOCX templating syntax.

Click Settings to configure the output file name, output format, watermark, PDF protection, and template engine.

Open template settings

In Template settings, you can:

  • Set the result file name

  • Select PDF as the output format

  • Add a watermark

  • Protect the result PDF

  • Select the template engine

Configure template

Delivery

The next step is delivery. In this example, we save the result file to OneDrive, but you can also use other delivery options.

Select the target folder and enter the file name.

You can configure multiple deliveries if needed. For example, you can also save the resulting PDF to SharePoint.

create pdf from template on form submission

Start Process

We will start the process from Power Automate.

Create Flow

This is the completed Power Automate flow:

pdf from Microsoft Form flow

Now configure each step.

Form is submitted

To start the flow when someone submits the form, add the When a response is submitted trigger from Microsoft Forms.

If this is your first time using Microsoft Forms in Power Automate, sign in to your account when prompted.

Then select the form you want to track.

Microsoft Form trigger

Get response details

Next, add the Get response details action from Microsoft Forms.

Select the same Form Id as in the trigger. Then click the Response Id field and choose List of response notifications - Response Id from Dynamic content.

Get response details

Start document generation process

This is the action from Plumsail Documents connector. This action is suitable for starting the process of generating documents from a template. You can find more information about this action by visiting this page.

If this is your first time using the Plumsail Documents connector, Power Automate will request you to create a new connection. Provide the following details and then click Create new:

  • Connection name - you can type any name for the connection, for example Plumsail Documents (production key);

  • API Key - create an API key in your Plumsail Account, copy it, and paste it into the API Key field;

  • Data center location - make sure the selected data center location matches the location of your account.

Create connection in Power Automate flow

Then configure the action:

  • Process name: select the process you created earlier

  • Fields for entering data: map Microsoft Forms fields to the DOCX template tokens

start generation documents action

Use the dynamic content from Get response details to populate the template fields in the action.

Menu on the right

Use the generated document in the flow

At this point, the flow is already complete. The generated PDF will be saved to OneDrive.

Final document

If needed, you can also use the generated file in later flow steps. For example, you can send it for approval with the Create an approval action from the Approvals connector.

send pdf for approval

Advanced case: Microsoft Forms with image upload

If your form includes image uploads, you can also pass the uploaded image to the DOCX template and include it in the generated PDF.

For example, the requester can upload a photo:

DOCX with image

The form may look like this:

Microsoft form with image attachment

Add a new token {{#picture imageData}} with the picture formatter to insert the image into the DOCX template.

Microsoft form with image attachment

Download the DOCX template with the image token.

To process the uploaded image, add these steps to the flow:

Power Automate flow

Add the Parse JSON action to get the image dynamic content.

Power Automate flow

Generate the schema from a sample. To get the sample payload, run the flow with only the Get response details action and copy the value of the image field.

Power Automate flow

Then click Generate from sample in the Parse JSON action and insert the copied sample JSON payload.

Power Automate flow

Next, add the OneDrive for Business action to get the image file content. Use the id value from Parse JSON.

Power Automate flow

Note

Power Automate automatically adds Apply to each action.

Finally, add the Start document generation process action and pass the file content from OneDrive for Business.

Use this expression:

body(‘Get_file_content’)[‘$content’]

Power Automate flow

The flow is now ready to generate a PDF from a Microsoft Forms response and include the uploaded image.

Sign up for Plumsail Documents

You can use this approach to generate documents automatically from Microsoft Forms submissions. If you are new to Plumsail Documents, register an account and try the steps from this article with a free 30-day trial.