| Mustafa Usmani
Convert HTML to PDF using Power Automate
In this blog, we’ll see how we can use HTML to make PDF using Cloudmersive’s Document Conversion Connector in Power Automate. If you are new to whole concept of Power Automate, you can check out our previous blog in which we dive deep on How Power Automate Works. So, let’s get started!
Before we start making our flow, let’s sign up for a Free Tier Account on Cloudmersive’s official website. Just go to this link and select the Free Tier Plan. You might also need to create an account if you’re visiting for the first time. After selecting the plan, answer the questions and it will take you to the API Keys page as shown below.
Now go ahead and click on Create Key and it will create an API Key for you. It’ll be useful when we will initialize the Cloudmersive’s connectors connection. After getting the API key, go ahead and make a flow in your Power Automate environment.
After creating the blank flow, add Cloudmersive’s Document Conversion Connector.
It’ll ask for an Action now, so select the “Convert HTML String to PDF” action. After selecting it, it’ll ask for a Connection name and the API Key. Give your connection desired name and paste the API key that we got before creating the flow from Cloudmersive’s website. Click on “Create”.
After creating the action, place your desired HTML in the “Html” dialog box as shown below.
After placing the HTML, you’ll need to save the action’s outcome somewhere. So, for that, I have used Create file action by Sharepoint in order to save the Output Content of the Cloudmersive’s action into a pdf file. However you do it, make sure to add the OutputContent of the Cloudmersive’s action in the File Content of the connector you are using in order to create the pdf file.
Now you’re all set to save and test your flow!
After your flow has run successfully, your pdf file will be waiting for you in the relevant folder that you’ve given if you’re using the action that I’ve used in order to create file. Here’s the output of the pdf file:
Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.