How to use Microsoft Flow to Convert HTML to PDF
As part of our ongoing series about using the Muhimbi PDF Converter Services in combination with Microsoft Flow, Logic Apps and PowerApps, we present a useful example which converts a blog post (basically HTML) to PDF when a new post is added to an RSS feed.
For those not familiar with the product, the Muhimbi PDF Converter Services is a popular product to PDF Convert, Merge, Watermark, Secure and OCR files from Microsoft Flow, LogicApps, PowerApps as well as your own code using C#, Java, Python, JavaScript, PHP, Ruby and most other modern platforms. Leave a message below or contact us if you have any questions.
We needed a good showcase for converting HTML to PDF. It was hard to narrow it down as everything nowadays is HTML. We settled for combining our HTML conversion sample with one of Flow’s other services, the ability to trigger a Flow when a new post is added to a Blog.
Once converted, the PDF is sent to the author of the Flow, but remember that this is just an example. Other options are to archive the generated PDF somewhere in SharePoint, DropBox, OneDrive, Google Drive or other file storage system. This example uses the RSS feed for the Microsoft Flow blog, naturally any other RSS feed or web page can be used as well.
From a high level, the Flow works as follows:
The full Flow can be found below. It is automatically created by the Flow Template named Send updates from the Flow blog as a PDF by email. Although the default settings are fully functional (send a PDF copy of Flow related blog posts), you may want to change the following fields:
-
RSS feed URL: The URL of the RSS feed to monitor for new posts. Try changing it to https://feeds.feedburner.com/MuhimbiBlog.
-
Email recipients: The recipient of the generated PDF.
That is all there is to it. We were pleasantly surprised by the usefulness of this simple flow. New blog posts are delivered by email to your mobile device overnight. While commuting on a train with a spotty internet connection we were able to read our favourite blog posts.
For more details about using Muhimbi’s Flow actions, see the Core Concepts knowledge base article as well as all other Flow related posts.
If you have any questions about extending this template, or implementing it in your environment, then please leave a message below or contact our friendly support desk. We are here to help.
Clavin is a Microsoft Business Applications MVP who supports 1,000+ high-level enterprise customers with challenges related to PDF conversion in combination with SharePoint on-premises Office 365, Azure, Nintex, K2, and Power Platform mostly no-code solutions.