Convert Microsoft Forms Responses to Word or PDF Documents

August 30th 2019

Want to generate Word or PDF documents from Microsoft Forms? You’re in the right place!

We’re excited to announce that our new Power Automate action Convert HTML to Word is now globally available within all Microsoft Power Automate regions. The action is pretty self-explanatory, as usual. It allows an HTML file, HTML data or a URL (Results) to be converted into a Microsoft Word document!

If you want to convert to PDF, please check out this article on our support site: Convert HTML to PDF.

NOTE: We have released a new action that simplifies converting Microsoft Forms to Word documents.

Scenario

Our support team periodically issue a customer satisfaction survey using Microsoft Forms. We need to get the results of each response and generate a word document containing extracted results allowing a support representative to pick up the document and apply further comments for internal records.

Guide

1. Set up a Microsoft Form configured to capture the required information.

2. Create a new Flow using the ‘Automated — from blank‘ option

3. Enter a name for the Flow, select the SharePoint ‘When a new response is submitted‘ Forms trigger, click ‘Create.

4. Select the target form

5. Add a ‘Get Response Details‘ action

5.a. Form ID: Select the form as per step 4

5.b. Response Id: Select the ‘List of response notifications Response Id‘ from the ‘When a new response is submitted‘ action

6. Add the Encodian ‘Convert HTML to Word‘ action (a major part of converting Microsoft Forms Responses to Word or PDF)

6.a. Filename: Enter the name of the output file (Docx). You may wish to generate a unique filename by using the concat expression such as:

concat('FormsToWordDemo-',utcNow(),'.docx')

6.b. HTML Data: Copy and paste the HTML data into the field. This demonstration uses this simple HTML snippet:

<html>
	<head>		
		<meta charset="UTF-8">
	</head>
	<body style="font-family:arial">
		<div style="padding-left: 12px;">
			<h2>Encodian Customer Satisfaction Survey</h2>
		</div>
		<div>
			<table style="width: 100%;"  cellpadding = "10">
				<tbody>
					<tr>
						<td><b>Submitted By<b></td>
						<td></td>
					</tr>
					<tr>
						<td><b>Submitted On<b></td>
						<td></td>
					</tr>
					<tr>
						<td><b>Overall, how satisfied are you with our company?<b></td>
						<td></td>
					</tr>
					<tr>
						<td><b>Please explain your satisfaction level in the question above.<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How well do our products meet your needs?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How would you rate the value for money of the product?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How responsive have we been to your questions or concerns about our products?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How long has your organization been a customer of our company?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How likely are you to continue doing business with us in the future?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>How likely are you to recommend our company to a friend or colleague?<b></td>
						<td> </td>
					</tr>
					<tr>
						<td><b>Encodian Comments<b></td>
						<td> </td>
					</tr>
				</tbody>
			</table>
		</div>		
	</body>
</html>

6.c. To interlace the response data, place your cursor in the target location within the HTML and select the required response field from the dynamic data

6.d. Complete all required fields

7. Add a ‘Create File‘ SharePoint action

7.a. Site Address: Set to the target SharePoint site

7.b. Folder Path: Set to the target SharePoint library and folder

7.c. File Name: Select the ‘Filename‘ field from the ‘Convert HTML to Word‘ action

7.d. File Content: Select the ‘File Content‘ field from the ‘Convert HTML to Word‘ action

8. Test the Flow by submitting a response to the target Microsoft Form

9. Validate the flow run has successfully executed

10. Check the Word document has been created

11. Validate the Word document with Microsoft Word

The ‘HTML to Word’ action also allows the conversion of HTML files and data retrieved from a URL.

The End!

We hope you’ve found this guide useful. As ever, please share any feedback or comments. All are welcome!

We hope this helps you convert Microsoft Forms Responses to Word or PDF. Who else is ready to get converting?

 

NOTE: HTML layouts are constrained by the HTML support provided by Microsoft Word. If you have a complex div/js/CSS-based layout, you may experience some challenges. And if you do, get in touch!

UPDATE: We’re excited to announce some significant updates to Flowr for Power Automate! As of October 2024, we’ve improved by updating action names and splitting Flowr’s central Power Automate connector into nine specialized connectors. These changes will make your workflow faster, smoother, and more efficient. The new action names are more precise and intuitive, saving you time, while the focused connectors enhance performance and flexibility. This update also helps future-proof the platform for even more powerful features. Check out our updated action names blog.

Author
Jay Goodison

Managing Director

You might also be interested in...