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

Convert Word Docx to PDF

Is there a way I can do this for a selected file? So each time a file is selected it will convert to PDF - the action looks like I need to select the exact file I want to convert when using SharePoint Online - if I do not know what file I want to convert or if this is variable can I incorporate that into the Flow? 

33 REPLIES 33

Re: Convert Word Docx to PDF

 

Inkedconvert word to pdf_LI.jpg

 

Super User
Super User

Re: Convert Word Docx to PDF

Mine the trigger is when an item is Modifed and then it looks at a few condtions. Using the Populate to Word it creates the document, converts to pdf and then I take it a step further and attach that pdf document back to the item on my SharePoint list as an attachment so it can viewed in my App. Works GREAT!

 

See below: (let me know if you need further explanation on any of the steps and I will post more breakdown)

 

Capture.JPG

Super User
Super User

Re: Convert Word Docx to PDF

Mine the trigger is when an item is Modifed and then it looks at a few condtions. Using the Populate to Word it creates the document, converts to pdf and then I take it a step further and attach that pdf document back to the item on my SharePoint list as an attachment so it can viewed in my App. Works GREAT!

 

See below: (let me know if you need further explanation on any of the steps and I will post more breakdown)

 

Capture.JPG

Re: Convert Word Docx to PDF

is it possible to do the same withouth writing back to OneDrive? Seems like an unecessary step, if it can be avoided if you just want to use SharePoint? 

 

To explain further, these files will be uploaded into SharePoint then routed out to different people for approval. Then once approved I want to convert them to PDF so we know its the final approved document. 

Super User
Super User

Re: Convert Word Docx to PDF

It is only the convert to PDF that does it back to OneDrive..and on mine it is just put there for a minute and then deletes it. There are a few other options for converting a document to a pdf that are probably not as simple but if you really wanted to avoid that part you could do a work around for that.

Super User
Super User

Re: Convert Word Docx to PDF

Hi @Basic_User007 

 

Have a way to do this without OneDrive, using the action 'Convert Word Document to PDF' but the action need the word identifier, this identifier only can be found in SharePoint Thumbnail column, I use this function to get:

 

 

first(split(last(split(triggerBody()?['{Thumbnail}']?['Large'],'items%2f')),'%3fversion'))

Anotação 2019-04-10 092248.jpg

 

 

I think that save file in OneDrive, convert this and after delete is the best approuch for a while

 


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Re: Convert Word Docx to PDF

Ok so I am having problems with the flow, it isnot able to reach the convert to pdf action as fails at get file content with error file not found. 

 

Copying image of flow steps I have created below along with error, any suggestions on how best to resolve this? 

Re: Convert Word Docx to PDF

 

convert word to pdf filenot found.png

 

convert word to pdf flow.png

 

Super User
Super User

Re: Convert Word Docx to PDF

Hi @Basic_User007 .

 

You are using the wrong column in File Identifier,

 

You are using ID, but you need to use IdentifierAnotação 2019-05-14 092117.jpg

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Super User
Super User

Re: Convert Word Docx to PDF

I posted a blog with detailed notes on using this feature: 

 

https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Generating-PDF-in-Flow-using-Word-...

 

See if this helps any.

Re: Convert Word Docx to PDF

Identifier field does not exist for me to select

Re: Convert Word Docx to PDF

 

Inkedpdf id_LI.jpg

 

Super User
Super User

Re: Convert Word Docx to PDF

@Basic_User007 

 

You are doing something different than what I had notes on because your steps are pretty different. If you are using 'For a selected file' you shouldn't need the get file content or the get file metadata as separate steps because you can add those into the 'For a selected file' trigger. 



 

Super User
Super User

Re: Convert Word Docx to PDF

To get Identifier use this action 'Get File Properties', inside it has the Identifier

 

Anotação 2019-05-14 094645.jpg

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Super User
Super User

Re: Convert Word Docx to PDF

@Basic_User007 

 

What exactly do you want to be your trigger and what do you want to happen? It looks like you want to be able to select a file as your trigger and then take that file and convert it to a pdf and then save it back to SP. Is that correct?

Re: Convert Word Docx to PDF

@gamoraeswhen I add get file properties there is not any dynamic content for me to select an id input - which is mandatory, unless you suggest me inputting some text? 

 

@rebeccasthat is exactly what I am trying to achieve - select file, to select flow which converts file to pdf and saves the pdf in a folder, doesnt sound too complicated but proving to be!! :S 

Re: Convert Word Docx to PDF

 

Inkedget file properties_LI.jpg

 

Super User
Super User

Re: Convert Word Docx to PDF

@Basic_User007 

 

Okay...so you need:

 

For a selected file

Get file properties, the Id is "Field" selected from the dynamic content of the 'For a selected file'

Get file content, the File Identifier is "Identifier" selected from the dynamic content of the 'Get file properties'

 

Then you can go on with your create file etc. Don't forget that when you change stuff up top you may need to remove and replace any of the dynamic content below...changes up top can lead to that need.

 

I did a quick test on my side so if you still have trouble let me know and I will send a few screen shots.

Super User
Super User

Re: Convert Word Docx to PDF

I don't why it's not appearing 😮

 

Paste this text inside field, and test please

 

@{triggerBody()?['entity']?['ID']}

 


Did I answer your question? Mark my post as a solution!

Gustavo Moraes, o astronauta brasileiro do Flow!


Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,802)