cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
henkprins
Frequent Visitor

Flow that converts (new) word files in SharePoint library to PDF and copies them to other location

Hi, 

 

I'd like to build a flow that automatically converts (new) word documents from an SharePoint library to PDF and copies them to another SharePoint environment.

 

Started with the 'When a file is created in folder', but when i want to pick the next step to convert the file i get a lot of options, including some 3rd party solutions. Also i see 'Converting Word  Document to PDF', but this is a trial version?

 

You notice i'm rather new and unexperienced flow user, and not sure if this the right way to start, but perhaps someone can help my by giving some suggestions.

 

Thanks in advance, henk.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Flow that converts (new) word files in SharePoint library to PDF and copies them to other location

Hi @henkprins ,

 

I guess you may not use When a file is created(properties only) as a trigger, so Identifier is not found.

I have tested it on my side. If it is a Flow configured according to the screenshot I provided, the file can be successfully converted to PDF.

In addition, the ErrorCode shows that the Word file does not seem to have content. Please make sure that the converted file is not a blank file.

It seems that the id configuration is incorrect, so there is no way to get the correct File content.

Please refer to the screenshot I provided and try again and feel free let me know if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Flow that converts (new) word files in SharePoint library to PDF and copies them to other location

Hi @henkprins ,

 

The common method is to convert the file through Convert file action contained in OneDrive/OneDrive for Business, and then use Create file action to copy the file.

I have tested on my side, you could refer to the screenshot below to configure Flow, it is recommended to use When a file is created (properties only) as trigger, as below:

17.PNG

Finally, you could configure Delete file action to delete the files previously generated for the converted file.

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
henkprins
Frequent Visitor

Re: Flow that converts (new) word files in SharePoint library to PDF and copies them to other location

Hi Barry,

 

thnx for your reply!

 

I tested this. Not sure: but i cannot find 'Identifier' mentioned in the second step, i used 'Id' instead.

 

I now get a 406 error when converting the file:

 

Error from Office Service. Url=https://euc.wordca.officeapps.live.com:973/wordca/wordconversionservice.svc/rest/ConvertFileUrl HttpCode=OK cert=subject:E=onedrivese@microsoft.com, CN=WordThumbnail-OneDrive, OU=Office Service Infrastructure, O=Microsoft Corporation, L=Redmond, S=Washington, C=US;thumbprint:7BEEDD2DA8FE0F90A72FEBB9C4BDF497E8D8FBDF ResponseHeaders=ResponseCode: Failure
ErrorCode: WordInputFileNullorEmpty
IsExpectedFailure: True
ErrorCategory: BadRequest
ServiceID: 9d1d0f54-bd14-458d-a51b-73edca59681e
OutputFormat:
ServiceRegion: NorthEurope
Date: Wed, 27 Feb 2019 09:45:59 GMT
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET

Community Support
Community Support

Re: Flow that converts (new) word files in SharePoint library to PDF and copies them to other location

Hi @henkprins ,

 

I guess you may not use When a file is created(properties only) as a trigger, so Identifier is not found.

I have tested it on my side. If it is a Flow configured according to the screenshot I provided, the file can be successfully converted to PDF.

In addition, the ErrorCode shows that the Word file does not seem to have content. Please make sure that the converted file is not a blank file.

It seems that the id configuration is incorrect, so there is no way to get the correct File content.

Please refer to the screenshot I provided and try again and feel free let me know if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,287)