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 / Dynamic/ Sharepoint: C...
Power Automate
Unanswered

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

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard