How to Convert Word DOCX to PDF in Power Automate
Most of our DOCX files are going to be shared as PDF documents eventually — it’s just a question of when and where those conversions will take place.
If we’re already using Power Automate to transfer Word documents between systems, store them in specific folders, or send them to stakeholders in our network, we can easily automate DOCX to PDF conversions within those workflows.
In this quick walkthrough, we’ll learn how to easily handle our Word/DOCX to PDF conversions in Power Automate using a free connector. We’ll consistently generate high-fidelity PDF documents, and we’ll have the opportunity to utilize our resulting PDF byte array directly in a wide range of subsequent flow actions.
We’ll use a manually triggered, instant cloud flow to build our example workflow.
To start, we’ll bring DOCX file bytes into our flow using a Get file content action (we’re using the OneDrive Get file content action in this example):
Next, we’ll add a new action and search for Cloudmersive connectors. We’re looking for the Cloudmersive Document Conversion connector with the green logo.
After we click “see more” to view the actions list, we can search for an action called Convert Word DOCX Document to PDF.
We’ll first notice the “premium” label on all of these actions. We will need a premium Power Automate license to access Cloudmersive connectors, but we can utilize all the API actions on this list (and actions from all other Cloudmersive connectors) for free with a free API key. To get a free API key, we can simply head to the Cloudmersive website and create a free account.
We’ll now add our DOCX file bytes and file name (note — we don’t need our real file name for this action to work correctly) to their respective request parameters:
At this point, our PDF file bytes are now available as dynamic content in our flow, and we can do anything we want with our converted file.
We could, for example, save our PDF as a new file, and then attach our file to an email:
After we run this flow, our email recipient will find a PDF version of our original DOCX file (in this case, a generic lorem ipsum document) in their inbox:
And that’s all there is to it!
We can plug this DOCX to PDF conversion action into a variety of automated, instant, and scheduled flows, and we can access a multitude of additional Cloudmersive actions with our API key.