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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dynamic/ Sharepoint: C...
Power Automate
Answered

Dynamic/ Sharepoint: Convert Word Docx to PDF (Word Online)

(0) ShareShare
ReportReport
Posted on by 611

I have a flow where I create a folder and then create a file in sharepoint. I then want to turn the file into a PDF from .docx using:

(Word Business) Convert Word Doc to PDF

 

What do I put in the File field to dynamically provide the file in sharepoint from create file?

 

PDFFlowIssue.png

Categories:
I have the same question (0)
  • Amanthaper Profile Picture
    441 on at

    Hi,

    Are you dynamically creating a few folder and word doc within that folder each time the flow runs?

    Also, is there a "Create new folder" Sharepoint action above the "create file" Sharepoint action in your flow which is not shown in your pic?

    Can you please show the actions prior to the convert word to pdf action?

    I think I may have the solution for you.

     

  • TesDA Profile Picture
    611 on at

    @Amanthaper- I am. Here is the flow:

     

    CompletePDFFlow.png

  • Verified answer
    Amanthaper Profile Picture
    441 on at
    Spoiler (Highlight to read)
    I'm sure there are a few different ways to do this. It's just a matter of stitching together the correct Sharepoint paths.
    Below is a working example of one method.
    I've replicated as much of your flow as possible and everything's dynamic. Referencing this example should do the trick.

    Here are the outputs from my testing. Dynamic SP folders with dynamic word and pdf files. All content is accurate.

    PA_UG_W2Pdf1.png

    STEPS BELOW

    1-3.  A replication of your flow. Note the content references from the action outputs. Just mirror these in your flow. Play close attention to the forward slashes.

    PA_UG_W2Pdf2.png
    4. Sharepoint create file action to make the PDF.

    5. Reference the Word Doc name but replace the extension for the PDF file. using this formula:
    replace(outputs('Create_Word_Doc')?['body/Name'],'.docx','.pdf')

    PA_UG_W2Pdf3.png

    I'm sure there are a few different ways to do this. It's just a matter of stitching together the correct Sharepoint paths.Below is a working example of one method.I've replicated as much of your flow as possible and everything's dynamic. Referencing this example should do the trick.Here are the outputs from my testing. Dynamic SP folders with dynamic word and pdf files. All content is accurate.STEPS BELOW1-3.  A replication of your flow. Note the content references from the action outputs. Just mirror these in your flow. Play close attention to the forward slashes.4. Sharepoint create file action to make the PDF.5. Reference the Word Doc name but replace the extension for the PDF file. using this formula:replace(outputs('Create_Word_Doc')?['body/Name'],'.docx','.pdf')

     

    Hope this helps,

     

    Aman T.

  • TesDA Profile Picture
    611 on at
    That worked beautifully. Thank you!
  • Amanthaper Profile Picture
    441 on at

    No worries - glad that worked out for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I am having the same problem where i cannot convert my word template to PDF using dynamic content. I am getting an error that 

    The selected file doesn't exist, please select a valid file and drive

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard