cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TesDA
Responsive Resident
Responsive Resident

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
Amanthaper
Super User
Super User

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
Amanthaper
Super User
Super User

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

@Amanthaper- I am. Here is the flow:

 

CompletePDFFlow.png

Amanthaper
Super User
Super User

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

TesDA
Responsive Resident
Responsive Resident

That worked beautifully. Thank you!

No worries - glad that worked out for you.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (36,895)