Flow Action - Convert Word Document to PDF

Brass Contributor

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?



32 Replies

Hi Rich,


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

Nothing yet.

@Rich Koneval  How are you executing the flow?  What is the trigger event you would like to use to start the conversion? Upload? Create?

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

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



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?

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:

@Rich Koneval Hey Rich, did you ever figure this one out?  Just stumbled across the same issue.  I've tried everything I can think for dynamically creating the filename.  No dice.





I've had the same issue testing the action.


Sadly, it's not something we can do dynamically but hoping it's a future update to the connector.


It's usefulness would skyrocket!




Same problem here. What do people do when they need to make this conversion happen automatically within a Flow? There is one third-party company out there that offers a $1,200 product but we do not need anything that sophisticated.


Since we utilize DocuSign at the end of this process, and that does the conversion, I am trying to now enable my original Word document to have the proper drop-downs, etc. before sending it through the DocuSign process.

@Rich Koneval 

Hi Rich, i managed to use the "Filename wich extenson" to get the thing running on a dynamic basis....

hopefully this works for you too?





Thanks Alexander! That looks like an update because you couldn't add dynamic properties before.

@Alexander Dorfmayr I don't understand how your solution works because it still doesn't for me at all.


When I manually select the file, the inputs look like this, and it works:


  "host": {
    "apiId": "subscriptions/2c8cfba1-d125-4f31-a479-50156c7ed09f/providers/Microsoft.Web/locations/westus/runtimes/unitedstates-002/apis/wordonlinebusiness",
    "connectionReferenceName": "shared_wordonlinebusiness",
    "operationId": "GetFilePDF"
  "parameters": {
    "source": "groups/390f8037-515b-4689-90e7-ce04092c89ab",
    "drive": "b!BfXatsB2n0CWjbomET8FGN5HPSqMmqVJkuANIAM7Fu6ohf774SBFQafqe7vmeMzr",
    "file": "01IVUUMXH5M5L7UL5P2JGYY776MHG4KCCU"

Note the "file": "01IVUUMXH5M5L7UL5P2JGYY776MHG4KCCU" part. Flow converts the path into that number to find the file.


But when I try to input a dynamic path (which always fails with error 400 "not found"), the input looks like this:


  "host": {
    "apiId": "subscriptions/2c8cfba1-d125-4f31-a479-50156c7ed09f/providers/Microsoft.Web/locations/westus/runtimes/unitedstates-002/apis/wordonlinebusiness",
    "connectionReferenceName": "shared_wordonlinebusiness",
    "operationId": "GetFilePDF"
  "parameters": {
    "source": "groups/390f8037-515b-4689-90e7-ce04092c89ab",
    "drive": "b!BfXatsB2n0CWjbomET8FGN5HPSqMmqVJkuANIAM7Fu6ohf774SBFQafqe7vmeMzr",
    "file": "Shared Documents/Sarah/District Billing/CIS/2019-2020/Pre Invoices/CIS Invoice C79 19-20 IDEA PreInvoice.docx"


See how now there's a literal path instead of a code. Flow chokes on this.


On a lark, I put in the expression '01IVUUMXH5M5L7UL5P2JGYY776MHG4KCCU' for the "File" field and, yes, it worked again.


But the problem is that this code does not correspond to any output from Sharepoint's "Get file properties" or "Update file properties". So on my end it looks like there is still no way to use "Convert Word to PDF" dynamically.


Would it help if my document was in the root directory of the library?

I just tried to use filename with extension and still doesn't work. This conversion is useless without a dynamic path.. and why can't it use the identifier or SharePoint ID? **bleep**, this is frustrating for such a simple process that is needed countless times in the legal community.

@Ben Girard Did you find a solution? For now I'm using the "Convert file" from the OneDrive connector instead, but it would be better to have entire the Flow only on SharePoint.

@Ben Girard I used the dynamic field "Name" in the File field and it worked.


I create a new file based upon another i.e. a template then use the Convert Word Document to PDF specifying the dynamic field "Name" of the new file to convert.


The file being converted uses quick parts and SharePoint metadata so the contents are dynamic.





No luck. I used all of the dynamics options... "Name", "Filenamewithexstension", "id" and even the preferred one, "identifier" and no luck. This is messed up... I'm on the early release of everything in Office 365... What bothers me is why Microsoft community people are not active on such a thread with such a big issue...

sips1, can you export your flow and send it over? or screenshots? I tried every combination... There must be something different... Thanks.

@Ben Girard 


Hi all.. 

I decided a simple workaround was in order.  I simply copy the file into OneDrive for business as a temporary location, use the "Convert file from OneDrive for Business" into PDF passing the Identifier as a variable" then create the PDF into sharepoint, and delete my temporary file from ODfB.  :)  It's more moving parts, but it works just fine until this issue is fixed.