I needed to generate a PDF in a Power Automate flow, without premium subscriptions.
Using the Word actions was not an option because they are premium.
After thinking a little bit, I found out I could achieve generating a PDF by using a combination of following actions:
- Create file (OneDrive)
- Convert file (OneDrive)
Building the PDF generation flow
To achieve the generated PDF, I followed these steps:
- Write HTML code, with parameters in it
- Create a HTML file
- Convert the HTML file to a PDF file
An example of how your HTML could look like:
After composing your HTML structure with all necessary parameters, you can create the HTML file:
After generating the HTML file, you can convert it to a PDF file:
Finally, you can create the PDF file:
Currently, there is no other way than using the OneDrive actions to generate a PDF without premium or without paying.
The generated PDF contains everything you defined in your HTML structure:
If you want to pay, you can use the Word actions, or buy a subscription from one of the following companies that have created custom actions for Power Automate.
- Plumsail Documents
- Plumsail SP
- PDF Blocks
- Muhimbi PDF
If you define a service account as run-only user, you can generate all files in the OneDrive of that service account. You can for example create a specific folder and keep all HTML and PDF files in that folder. Make sure to generate dynamic HTML and PDF files to avoid duplicate file names.
The complete flow looks like this:
Is it possible to generate a PDF of more than one page?
Hi Matias, please check my new blogpost about generating a multiple pages PDF with Power Automate: https://www.inspiribytes.com/power-automate/generate-multiple-pages-pdf-in-power-automate/