cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Responsive Resident
Responsive Resident

Spoiler
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

 

Hope this helps,

 

Aman T.

View solution in original post

5 REPLIES 5
Responsive Resident
Responsive Resident

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.

 

@Amanthaper- I am. Here is the flow:

 

CompletePDFFlow.png

Responsive Resident
Responsive Resident

Spoiler
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

 

Hope this helps,

 

Aman T.

View solution in original post

That worked beautifully. Thank you!
Responsive Resident
Responsive Resident

No worries - glad that worked out for you.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (13,234)