Power Automate – Convert Word document to PDF

Introduction

Hi, friends welcome back to my blog with another exciting topic. Let’s see how can we convert the word document to PDF using Power Automate. Here we are going to automate the process of conversion when the Word document uploaded to the document library.

Critical Factor

For converting Word to PDF, there are many actions available which are not free and also from the third party providers. Not all clients can purchase third party actions or premium connectors. So, to ease the flow, let us see how can we achieve the same without buying any extra connectors.

Focus on the flow

For demonstration purpose, I had used two document libraries named ‘Demo Docs‘ source library, and ‘Flow Docs‘ destination library for storing the converted PDF document. Whenever a document uploaded to the source library, the flow triggers, and start the conversion process.

Note: We will use Onedrive to store the files for the conversion and then will remove it after the conversion. All the actions and triggers used here are provided with the link to the Microsoft docs, please feel free to learn more by clicking the link.

  • Fill in the following properties for the trigger action
    • Site Address – Choose the site collection where the source library reside.
    • Library Name – Choose the source library.
    • Folder – Optional, choose only if you want to trigger based on the files uploaded to the specific folder.
  • Next we need to get the file content. We can use either ‘Get file content‘ or ‘Get file content using path‘. Both the actions provide us the file content, the only difference is the values passed as an argument to the actions.
  • I am going to use ‘Get file content‘ and fill in the following properties.
    • Site Address – Choose the site collection where the source library reside.
    • File Identifier – Choose the File Indentifier form the Dynamic Content popup from the trigger output.
  • The next action is to create the file in Onedrive for conversion purpose.
  • Use the action ‘Create file‘ Onedrive action and fill in the following properties.
    • Folder Path – Choose the folders in the Onedrive to create the file. I chose the root folder.
    • File Name – Choose File name with extension from the trigger output.
    • File Content – Choose File Content from the Get file content action.
  • Add the action ‘Convert file (Preview)‘ to convert the file created in the previous action to PDF. Fill in the properties as shown below.
    • File – Choose Id from the previous action from the Dynamic Content popup.
    • Target Type – Choose PDF.
  • Now the file is converted to PDF and its in memory, add the action ‘Create file (SharePoint action)‘ to create the PDF file in SharePoint destination library. Fill in the properties as shown below.
    • Site Address – Choose the site collection where the destination library reside.
    • File Name – choose the property File name from the Convert file action.
    • File Content – choose the property File content from the Convert file action.

Once the flow ran, the file is successfully converted to PDF in the destination library, the below action is an optional action in-case you might need to delete the file created in the Onedrive for temporary purpose. Its entirely up to you to keep the files in Onedrive for tracking purpose or delete once the conversion is done. Follow the steps below to delete the file in Onedrive.

  • Add the action named ‘Delete file (Onedrive action)‘ and fill in the properties as shown below.
    • File – Choose the Id property from the Create file (onedrive action).

Thats it, following the above steps, you can successfully convert the Word documents to PDF without using third party or premium actions.

Preview

Reference Links to Triggers & Actions

Happy Flowing…

4 thoughts on “Power Automate – Convert Word document to PDF

  1. Greetings from Los angeles! I’m bored at work so I decided to check out your website on my iphone during lunch break. I really like the knowledge you present here and can’t wait to take a look when I get home. I’m shocked at how fast your blog loaded on my cell phone .. I’m not even using WIFI, just 3G .. Anyways, fantastic site!

    Like

Leave a comment