Forum Discussion

Rich Koneval's avatar
Rich Koneval
Brass Contributor
Mar 28, 2019

Flow Action - Convert Word Document to PDF

I'm trying to use the Convert Word Document to PDF action in a Flow. There are three parameters that have to be entered:

  • Location - the SharePoint Site
  • Document Library - Library where the document is located.
  • File - The document to convert

The parameter that I'm having an issue with is the File. The flow works if I choose the specific document from the library but I want it to be dynamic so that when the user starts a Flow on the document it will convert that one, so I don't want to hardcode the document name.

 

For the File property I'm using the property from a previous step with the file name called File name with extension.

 

When I run the flow I get an error, "There was an error accessing the file. Please try again or select a different file."

 

Can I not use dynamic content for the File property?

 

Thanks 

37 Replies

  • noahzani's avatar
    noahzani
    Copper Contributor

    Hi Rich Koneval 

     

    I just encountered the same problem.

     

    from what we can see in the Flow history for a File that is selected, it looks like "/report1.docx".
    i tried to recreate that dynamically with /'File name with extensions' but without success. it fails altough in the history it shows exactly the same like "/report1.docx".

     

    as long as this action does not take file inputs dynamically, it is not really useful..

    • OldForest's avatar
      OldForest
      Copper Contributor

      noahzani 

       

      I stumbled upon the same problem this afternoon. The fact that "Convert Word Document to PDF" can't use dynamic content is ridiculous - what is the purpose of it otherwise?

      • OldForest's avatar
        OldForest
        Copper Contributor
        There is a workaround which makes it even sillier. If your file is stored in OneDrive for Business then its very straightforward to just use the "Convert File" action otherwise you have to use some SharePoint API shenanigans such as this guide:
        http://www.cleverworkarounds.com/2018/06/30/some-seriously-powerful-and-free-pdf-functionality-in-powerapps-and-flow-part-1/
  • I'm experiencing exactly the same issue. I've even experimented hard-coding the file name in exactly how it appears when you select it through the file explorer but I get the same error when doing this. There must be some way to dynamically pass-in a file...
  • Rich Koneval  How are you executing the flow?  What is the trigger event you would like to use to start the conversion? Upload? Create?

  • Davy Loose's avatar
    Davy Loose
    Brass Contributor

    Hi Rich,

     

    Did you find a solution? I'm encountering the exact same problem.