Subscribe to News feed

Use Flow to Convert a file to PDF and email it when a SharePoint document is added

Posted at: 18:03 on 28 March 2017 by Muhimbi

FlowLogoMicrosoft recently made the Muhimbi PDF Converter Services Online available to all users of their Flow, LogicApps and PowerApps products. As part of this process we are publishing a number of templates to make it easy for people to get started.

Although all templates are also available from Microsoft’s own Service page, it is not possible to include detailed guidance in those templates, which is why we are publishing more details on our Blog… here.

For those not familiar with the product, the Muhimbi PDF Converter Services Online is a popular product to PDF Convert, Merge, Watermark, Secure and OCR files from Microsoft Flow, LogicApps, PowerApps as well as your own code using C#, Java, Python, JavaScript, PHP, Ruby and most other modern platforms. Leave a message below or contact us if you have any questions.

 

In this example we’ll show how to create a simple Flow that is triggered whenever a file is added to a folder in a SharePoint Online Document Library. Once added, the file is automatically converted to PDF and sent as an email attachment to the author of the Flow.

Remember that this is just an example, it can easily be adjusted to use different file services (e.g the trigger can be for files uploaded to OneDrive, Box.com, DropBox, Google Drive etc) and the email can be sent via different email providers (Outlook.com, generic email, Gmail, etc) to a distribution list of your choice.

There are many reasons for building a workflow like this one. A popular use amongst our customers is to allow users on non-Windows devices (mobile phones, tablets) – who are not always getting a good experience when they try to open native Office, AutoCAD or other file formats – to see the files in their original layout and formatting. Regardless of platform, PDFs always display perfectly.

 

From a high level, the Flow works as follows:

Convert & Email - Overview

 

The full Flow can be found below. It is automatically created by the Flow Template named Send a PDF rendition by email when a SharePoint document is added, it is just a matter of filling out the blanks, specifically:

  • Site Address: The URL of the SharePoint Site containing the Document Library to monitor.
  • Folder ID: The path to the folder in the Document Library to monitor.

 

Convert & Email - Detail - Part1 Convert & Email - Detail - Part2

That is all there is to it, nice and easy.

For more details about using Muhimbi’s Flow actions, see the Core Concepts knowledge base article as well as all other Flow related posts.

If you have any questions about extending this template, or implementing it in your environment, then please leave a message below or contact our friendly support desk. We are here to help.

.

Labels: , , , , , ,

2 Comments:

  • I have a use case where I want to take a SharePoint document library with content that exists and convert it to a PDF with a watermark. I would like to save the PDF to another SharePoint document library. How is that accomplished? Going forward, I would then like to do this as each new form is added once I have the history taken care of.

    By Blogger Madge, At 01 May, 2020 16:03  

  • That is totally possible, but it requires some knowledge of Power Automate (Flow).

    Have a look at this post, which is quite similar but iterates over multiple files to merge rather than convert. The concept is the same though: https://clavinfernandes.wordpress.com/2019/06/18/merging-documents-to-pdf-using-micsrosoft-flow/

    So basically it is

    * Some Flow Trigger (e.g. timer)
    * List files in Folder action
    * 'Apply to each' block to iterate over all files
    * Get file content action
    * Send file to Muhimbi 'Convert Document' action
    * Write generated PDF file back to SharePoint using 'Create file'
    * Copy metadata using Muhimbi 'Copy metadata' action

    Details about copying metadata can be found here: https://blog.muhimbi.com/2018/02/use-microsoft-flow-to-copy-sharepoint.html

    If you have questions, or would like to book a no-obligations screen share, then please contact support@muhimbi.com

    By Blogger Muhimbi, At 01 May, 2020 16:41  

Post a comment

Subscribe to Post Comments [Atom]

Need support from experts?

Access our Forum

Download Free Trials