web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert SharePoint Wor...
Power Automate
Unanswered

Convert SharePoint Word Doc to PDF

(0) ShareShare
ReportReport
Posted on by

Has anyone successfully created a PDF file from a Microsoft Word Document using Flow?

I am able to create a flow that passes the new 'flow checker' but the PDF file is not viewable. I receive the following message when trying to view the PDF file: 

Error
Failed to load PDF document.

Categories:
I have the same question (0)
  • jkeckard007 Profile Picture
    108 on at

    I have been able to do it using One drive.  I used the below as a reference to set mine up and it works.

    https://www.youtube.com/watch?v=vUoRAxFNxlA

  • Verified answer
    v-bacao-msft Profile Picture
    on at

    Hi @Anonymous,

     

    Could you share a screenshot of your Flow configuration?

    I have made a test on my side and the flow works well. Please take a try with the following workaround:

    Use Condition to determine the file type and see if its filename with extension ends with ".doc/.docx".

    If yes, get the file content, convert the file format with OneDrive-Convert file action, and create a new file with Create file.

    Finally, consider deleting the transition file created in OneDrive.

    Image reference:

    Expression:

    or(endsWith(triggerBody()?['{FilenameWithExtension}'],'.doc'),endsWith(triggerBody()?['{FilenameWithExtension}'],'.docx'))

    31.PNG

    30.PNG

    Please take a try.

     

    Best Regards,

    Barry

  • Community Power Platform Member Profile Picture
    on at

    That worked! Thank you!

  • Community Power Platform Member Profile Picture
    on at

    I am trying to do something similar but my use case is a little different. In short, I would like to convert a submitted Form (O365 Forms) and send the results as a PDF document to either a SharePoint list or document folder. So far I have created a Flow that can do the following.

    • When a Form Response is received,
      • Compose content from responses
      • Create File in One Drive for Business with Compose Output as Word doc file
        • File name is dynamically created using fields from Form responses
      • Create File in SharePoint  with Compose Output as Word doc file

    My Flow is successful to this point. 

     

    At this point, I tried adding the steps in this solution beginning with Get File Content. It looks like I can use the Name parameter to get the created file name but I do not see how I can add the SharePoint folder path. When I hard code the filename, I get the step to work. Any suggestions?

  • Community Power Platform Member Profile Picture
    on at

    When you select the "create file" action for SharePoint, you should be able to select the site then the folder path in a dropdown. If not, you can manually enter the folder path. 

     

    It is also possible to send your form results to a SharePoint list by using the "create item" Sharepoint action. Before you create this flow, you'll need to create corresponding columns for the form results (questions) in the SharePoint list. These columns will be referenced in the "create item" step. 

  • Community Power Platform Member Profile Picture
    on at

    Hi Barry,

     

    This solution is no longer working. Did the Flow actions change? 

     

    I can create PDFs but the PDF file content cannot be viewed.

     

    Kelli

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard