In this guide, you’ll learn how to combine and convert Microsoft forms into a single document using Power Automate.
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 Muhimbi PDF Converter, you can merge form responses and attachments into a single document and then send that document as an email. You can also write the generated file 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.
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 Muhimbi PDF Converter
- Permission to use Power Automate
- Appropriate privileges to create flows
Using Power Automate to Convert Forms to Email
The image below shows a high-level overview of the flow.
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.
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.
3. Adding the Compose Action
Add the Compose action. You can copy the HTML code fragment provided below into the Inputs field and then insert the various list fields in the appropriate places, just between each line’s <td\</td\elements. Your completed code will look like what you see in the screenshot.
4: Converting the File
Add the Muhimbi Convert document action. In the Source file name field, include a proper name with .html
as the extension. In the Source file content field, choose Outputs. In the Output format field, choose PDF from the dropdown menu. Click Save to save the workflow.
5: Creating a File
Next, add the Send an email (V2) action. In the To, Subject, and Body fields, enter suitable values. If you want the email to be sent from a different email address, enter the email address in the From (Send as) field. In the Attachments Name field, select the base file name without an extension, but ensure you add the .pdf
extension to this. In the Attachments Content field, select the processed file content, which is the file generated by Muhimbi PDF Converter.
Click Save to save the workflow.