Forum Discussion
Flow Action - Convert Word Document to PDF
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?
Regards
Alex
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?