How to Convert Word DOCX to PDF in Power Automate

Cloudmersive
3 min readSep 20, 2024

--

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.

Starting point for a manually triggered instant cloud flow in Power Automate

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):

OneDrive Get file content action retrieves DOCX file from a OneDrive folder

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.

Searching “Cloudmersive” brings up the Cloudmersive Document Conversion connector

After we click “see more” to view the actions list, we can search for an action called Convert Word DOCX Document to PDF.

Searching Convert Word DOCX Document to PDF brings up the correct action on the Document Conversion connector actions list

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:

Convert Word DOCX Document to PDF request parameters configured with DOCX file bytes

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:

Example workflow that creates a new PDF document and sends the document via Outlook Send an email (V2)
Send an email (V2) action with PDF file bytes attached

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:

Resulting email with the converted PDF open in the Outlook PDF viewer

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.

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet