Turn Microsoft Forms responses into PDFs with Power Automate

Turn Microsoft Forms responses into PDFs with Power Automate

Microsoft Forms to PDF with Power Automate. Turn each response into a designed PDF, save it to OneDrive or SharePoint and email it in Outlook.

Quick answer. When someone submits your Microsoft Form, Power Automate gets the answers. An HTTP step sends them inside a template to html-pdf.com, which returns the PDF. The next steps save it to OneDrive or SharePoint and email it with Outlook.

What you'll build

Every response turns into its own document. A safety inspection form becomes a dated inspection report. A training quiz becomes a certificate. A request form becomes a one page summary that lands in a SharePoint folder for your manager.

The PDF uses your company's design, not the plain Forms layout, and it is created a few seconds after someone hits Submit.

What you need

Step by step in Power Automate

  1. Create the flow. Go to Power Automate and choose Create → Automated cloud flow. Pick the Microsoft Forms trigger When a new response is submitted and select your form.
  2. Read the answers. Add Microsoft Forms → Get response details. Choose the same form and set Response Id to the value from the trigger.
  3. Make the PDF. Add the HTTP action. Method POST, URI https://html-pdf.com/v1/pdf. Add headers Authorization with Bearer hp_live_... and Content-Type with application/json.
  4. Body. Paste the JSON below. Replace the sample text with answers from Get response details using the dynamic content picker.
  5. Save the file. Add OneDrive for Business → Create file (or SharePoint → Create file). Set File Name to something like inspection.pdf. For File Content, use the expression base64ToBinary(body('HTTP')?['pdf_base64']).
  6. Email it. Add Office 365 Outlook → Send an email (V2). Under attachments, use the same file name and the same expression for the content.
{
  "html": "<h1>Site inspection</h1><p><b>Inspector:</b> Dana White</p><p><b>Site:</b> Warehouse 3</p><p><b>Result:</b> Passed</p>",
  "format": "A4",
  "margin": "18mm",
  "filename": "inspection.pdf",
  "response": "base64"
}

Here "response": "base64" returns the PDF as text inside JSON, which Power Automate turns back into a file with base64ToBinary. The response also includes pages and credits_remaining if you want to log them.

Tip. If answers might contain quotes, build the body with a Compose action and the json() or string() expressions, so the JSON stays valid.

No premium option

Without the HTTP action, you can still get a PDF. Create an .html file in OneDrive with Create file, then use OneDrive for Business → Convert file with PDF as the target type. Styling support is more limited than a full browser renderer, so test your design.

Another route is to send the Forms answers to Zapier, Make or n8n and call html-pdf.com there. See the Zapier guide, Make guide or n8n guide.

Code path for developers

If you'd rather run your own code, have Power Automate post the answers to your endpoint and render there.

app.post("/forms", express.json(), async (req, res) => {
  const { inspector, site, result } = req.body;
  const html = `<h1>Site inspection</h1><p>${inspector}</p><p>${site}</p><p>${result}</p>`;

  const r = await fetch("https://html-pdf.com/v1/pdf", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.HTML_PDF_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({ html, response: "url" }),
  });
  const { url } = await r.json(); // valid for 24 hours
  res.json({ url });
});

Ask your AI agent

With the html-pdf.com MCP server connected to Claude or ChatGPT, you can design the layout before building the flow.

Use html-pdf to create an A4 site inspection report PDF. Inspector Dana White, Warehouse 3, 10 Oct 2026, 12 checklist items with pass or fail, a notes section and page numbers in the footer.

Then ask for the HTML and paste it into the HTTP body.

FAQ

Can I convert Microsoft Forms responses to PDF without premium actions?

Yes, with the OneDrive Convert file trick, though styling is limited. For a fully designed PDF, use the premium HTTP action or route the response through Zapier, Make or n8n.

Why is my PDF file corrupt in OneDrive?

Usually the File Content got the base64 text instead of the file. Wrap it in base64ToBinary() as shown in step 5.

Can I print all Forms responses as one PDF?

Yes. Open the responses in Excel, then use a scheduled flow that reads the rows, builds one page with all of them and sends it in a single request. Each page of the result costs one credit.

Does html-pdf.com store the answers?

No. The HTML is not stored, and if you use the url response, download links expire after 24 hours.

This page as markdown · text