---
title: "Convert Microsoft Forms to PDF"
canonical_url: "https://www.nutrient.io/guides/document-converter/power-automate/conversion/ms-form-to-pdf/"
md_url: "https://www.nutrient.io/guides/document-converter/power-automate/conversion/ms-form-to-pdf.md"
last_updated: "2026-06-08T09:14:14.321Z"
description: "Learn how to convert Microsoft Forms to PDF using Power Automate. Follow these steps to merge attachments and email the final document."
---

# Convert Microsoft Forms to PDF

Want to see it in action? [Contact us](https://www.nutrient.io/low-code/contact-sales) to schedule a demo!

In this guide, you’ll learn how to convert Microsoft forms to PDF using Power Automate.

Steps to convert your Microsoft form to PDF using Power Automate:

1. Create a flow

2. Define your action

3. Create a file

4. Publish your workflow

Microsoft Forms provides a quick and easy way to create surveys and questionnaires to collect responses from different people. Even though this is useful, the completed forms aren’t easily portable — i.e. you can’t send a form to another person and expect to keep the look and feel of the completed form, along with any files that have been uploaded to it, intact.

Using Power Automate and [Nutrient Document Converter](https://www.nutrient.io/low-code/try/?product=document-converter), you can merge form attachments into a single PDF, along with the responses, and then send that PDF as an email. You can also write the generated PDF to SharePoint, OneDrive, or anywhere you can send files using Microsoft Power Automate.

### Sample MS form with attachment

This example will use the following form.![sample ms form](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-1.jpg)

### Prerequisites

Before building the workflow, ensure all prerequisites are in place:

- Knowledge about Microsoft Forms and how to build workflows using Power Automate

- A full, free, or trial subscription to [Nutrient Document Converter](https://www.nutrient.io/low-code/try/?product=document-converter)

- Permission to use Power Automate

- Appropriate privileges to create flows

### Using Power Automate to convert forms with attachments to PDF

The image below shows a high-level overview of how to convert forms with attachments to PDF.![convert forms with attachments](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-2.png)

### 1: Creating a flow

Add the **When a new response is submitted** trigger action specifying the **Form Id** of the Microsoft Form. It will trigger the flow when a new response is submitted.![when a new response is submitted](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-3.jpg)

### 2: Getting the response details

Add the **Get response details** action, specifying the **Form Id** and **Response Id** of the Microsoft form. This will trigger the flow when a new response is submitted.![get response details](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-4.jpg)

### 3: Converting to PDF

Convert the form to PDF by adding the Nutrient **Convert HTML to PDF** action. You can copy the HTML code fragment provided below into the **Source URL or HTML** field of the Nutrient action and then insert the various list fields in the appropriate places, just before each line’s `<br />` element. Your completed code will look like what you see in the screenshot.

```html

\<html\>

\<body\>

\<h2\>Sample Patient Questionnaire\</h2\>

Please enter your name:\<br /\>

Please enter your date of birth:\<br /\>

Responder Email:\<br /\>

Submission Time:\<br /\>

\</body\>

\</html\>

```![convert html to pdf](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-5.jpg)

### 4: Working with attachments

Add the **Compose** action to the canvas, and set the **Inputs** to the field that collects the attachments. In this scenario, it’s the **Please upload your test results from the clinic** field, which is the output of the **Get response details** action. Press **Save** to save the workflow.![get response details](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-6.jpg)

**Note:** You use this action as a temporary one to get the JSON sample payload for the **Parse JSON** action. This can remove the action after getting the payload.

### 5: Getting the sample payload

Fill in the form, upload a file, and submit the form. This will trigger the flow.

- You can now open the flow that just ran and expand the **Compose** action, which will look like the screenshot below.

- Copy the JSON from the **OUTPUTS** section of the **Compose** action to a clipboard, and then delete the **Compose** action.![copy json from](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-7.jpg)

### 6: Parsing the JSON

Next, add the **Parse JSON** action to the canvas, and fill in the following:

- **Content** — Pass the **Please upload your test results from the clinic** field, which is the output of the **Get response details** action, and which is where your attachments are stored.

- **Schema** — In the **Parse JSON** action, click the **Generate from sample** button, which will open a modal dialog box. Paste the content from the JSON you copied from the **Compose** action into the text box, and press **Done**.![parse json](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-8.jpg)

**Note:** From the schema, you’ll notice that the output for the uploaded document is an array of objects that contains the file name, link to item, etc. You’ll need to parse these JSON objects to keep using the schema in your flow.

### 7: Initializing the variable

Add the **Initialize Variable** action, and set the **Name** field to **Files** and the **Type** field to **Array**.![variable action](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-9.jpg)

### 8: Getting the file content

Add the **Get file content** action, and in the **File** field, add the item **id**, which is the output of the **Parse JSON** action.![Get file content](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-10.png)

**Note:** Power Automate will automatically add the **Apply to each** loop around the **Get file content** action.![Apply to each](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-11.png)

### 9: Appending to the array variable

Next, within this loop, add the **Append to array variable** action. In the **Name** field, specify **Files**. In the **Value** field, add the following:

```json

{
"source_file_name": @{items('Apply_to_each')\['name'\]},
"source_file_content": @{body('Get_file_content')\['$content'\]}
}

```![value and names](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-12.jpg)

### 10: Merging documents

Outside the **Apply to each** loop, add Nutrient’s **Merge documents** action. Ensure **Switch to input entire array** is active, and pass in the **Files** variable, which is the output of the **Append to array variable** action.

Merge the Microsoft form text question to the attachments. To do this, add another **Merge document** action, configuring it with reference to the details below:

- **Source file name – 1** — **InitialQuestion.pdf**

- **Source file content-1** — **Processed file content**, which is the output of the **Convert HTML to PDF** action.

- **Source file name – 2** — **Merged.pdf**

- **Source file content – 2** — **Processed file content**, which is the output of the **Merge documents 1** action.

**Note:** Do not switch to detail inputs for an array item in the Nutrient **Merge** action.![source file content](@/assets/guides/muhimbi/pdf-converter/power-automate/form-to-pdf-13.jpg)

### 11: Choosing a send action

Choose any send action. In this example, you can use the **Send an email(V2)** action and configure it with reference to details below:

- **To** — Email address

- **Subject** — Patient Questionnaire <You can input any subject of your choice.>

- **Body** — Hi, Patient Questionnaire has been submitted by “Responder’s Email”. Many thanks, Patient Services <You can input any content of your choice here>

- **Attachment Name** — sample.PDF

- **Attachments Contents** — **Processed file content**, which is the output of the **Merge documents 2** action.

Now go back to the sample questionnaire and answer it. Attach files and click **Submit**.

You’ll notice that the responses and attachments will be converted to PDF and emailed to the email address chosen in the **Send an email(V2)** action.
---

## Related pages

- [Convert CSV files to Excel with Power Automate](/guides/document-converter/power-automate/conversion/csv-to-excel.md)
- [Convert CAD/DWG to PDF using Power Automate](/guides/document-converter/power-automate/conversion/cad-to-pdf.md)
- [Convert email attachments to PDF using Power Automate](/guides/document-converter/power-automate/conversion/email-with-attachments-to-pdf.md)
- [Convert email to PDF using Power Automate](/guides/document-converter/power-automate/conversion/email-to-pdf.md)
- [Convert to PDF using Power Automate](/guides/document-converter/power-automate/conversion/convert-to-pdf.md)
- [Power BI automated export to PDF using Power Automate](/guides/document-converter/power-automate/conversion/bi-reports-to-pdf.md)
- [Convert Excel to PDF using Power Automate](/guides/document-converter/power-automate/conversion/excel-to-pdf.md)
- [Convert form to email using Power Automate](/guides/document-converter/power-automate/conversion/form-to-email.md)
- [Convert documents using Power Automate](/guides/document-converter/power-automate/conversion.md)
- [Convert InfoPath forms to Word documents](/guides/document-converter/power-automate/conversion/infopath-to-word.md)
- [Convert InfoPath to Excel](/guides/document-converter/power-automate/conversion/infopath-to-excel.md)
- [Convert InfoPath forms to PDF](/guides/document-converter/power-automate/conversion/infopath-to-pdf.md)
- [Convert HTML to PDF using Power Automate](/guides/document-converter/power-automate/conversion/html-to-pdf.md)
- [Convert Excel files to CSV with Power Automate](/guides/document-converter/power-automate/conversion/excel-to-csv.md)
- [Transform Microsoft Forms into Word documents](/guides/document-converter/power-automate/conversion/ms-form-to-word.md)
- [Convert images to PDF in Power Automate](/guides/document-converter/power-automate/conversion/image-to-pdf.md)
- [Convert Nintex forms to PDF with Power Automate](/guides/document-converter/power-automate/conversion/nintex-form-to-pdf.md)
- [Convert TXT files to PDF using Power Automate](/guides/document-converter/power-automate/conversion/text-to-pdf.md)
- [Convert Visio to PDF Using Power Automate](/guides/document-converter/power-automate/conversion/visio-to-pdf.md)
- [Convert SharePoint files to PDF using Power Automate](/guides/document-converter/power-automate/conversion/sharepoint-to-pdf.md)
- [Convert SharePoint wiki files to PDF using Power Automate](/guides/document-converter/power-automate/conversion/wiki-to-pdf.md)
- [Convert SharePoint pages to PDF using Power Automate](/guides/document-converter/power-automate/conversion/sharepoint-page-to-pdf.md)
- [Convert Word to PDF with Power Automate](/guides/document-converter/power-automate/conversion/word-to-pdf.md)
- [Convert PowerPoint to PDF using Power Automate](/guides/document-converter/power-automate/conversion/ppt-to-pdf.md)
- [Convert SharePoint lists to PDF Using Power Automate](/guides/document-converter/power-automate/conversion/sharepoint-list-to-pdf.md)
- [Convert XLS to XLSX using Power Automate](/guides/document-converter/power-automate/conversion/xls-to-xlsx.md)

