Subscribe to News feed

Use Flow to PDF Convert email attachments to OneDrive, DropBox, Google Drive etc

Posted at: 1:44 PM on 31 March 2017 by Muhimbi

outlookAs part of our ongoing series about using the Muhimbi PDF Converter Services Online in combination with Microsoft Flow, Logic Apps and PowerApps, we present a cool example which converts all email attachments to PDF and archives them to a file service.

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, Logic Apps, 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.

 

The examples in this series are becoming increasingly complex, so today we have to dig slightly deeper than before.

In this example we’ll show how to create a simple Flow that is triggered whenever an email – containing attachments – is received in Office 365 Outlook. The Flow then iterates over all attachments and converts the ones it knows how to convert to PDF. The resulting PDF files are archived to a OneDrive for Business folder, which will sync the files to other systems providing the sync client is installed somewhere.

Remember that this is just an example, it can easily be modified to use different email providers (Outlook.com, Gmail) and the converted attachments can be written to (or emailed) via any of the 100+ available Flow services, including Google Drive, Box.com, DropBox, OneDrive, SharePoint etc.

There are many reasons for building a workflow like this one. What we hear a lot from customers who do something similar, is that their regulatory body dictates that all files are made available, and discoverable, in a standardised format. PDF (specifically PDF/A which we support as an option) is often the format of choice.

 

From a high level, the Flow works as follows:

PDF Attachments - Overview

 

The full Flow can be found below. It is automatically created by the Flow Template named Archive email attachments in PDF format to OneDrive, it is just a matter of filling out the blanks, specifically:

  • Save to OneDrive – Folder path: Specify the path in OneDrive where the converted attachments will be written to.

 
There is something important to keep in mind for this particular template / example and that is that all files are written to a flat folder. If we use the original attachment file name to save the PDF in OneDrive then files would potentially be overwritten if a single email has multiple attachments with the same name (rare but possible) or multiple emails are processed and some use an attachment with the same name (more common).

To get around this we use the Compose action to convert the time that the workflow is executed, which matches the time the email is received, and clean it up for use in file names (replace ‘:’ with ‘-‘). We then concatenate it to each file name. If your requirements are different then feel free to change this or – for example – add this time stamp to the OneDrive path to automatically create a sub-folder for each email and their attachments.

 

PDF Attachments - Detail - Part1PDF Attachments - Detail - Part2

 

One of the tricks we use in this example is changing the default ‘Fail on error’ option in the Muhimbi Workflow actions from Yes to No. As a result, the Flow will not fail if an unsupported or broken attachment type is encountered. By evaluating the Result Code we can decide if the operation was successful and write the PDF to OneDrive. For more details about this concept see the Error handling section in our Core Concepts knowledge base article.

 
That’s it, now publish the Flow and send an email containing some Word, Excel, PowerPoint or other supported files types to the email address associated with the Flow. After a few moments PDFs will appear in the destination folder.

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 Flow / 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: , , , , , , , ,

Use Flow to automatically convert newly added OneDrive files to PDF

Posted at: 3:04 PM on 29 March 2017 by Muhimbi

onedriveAs part of our ongoing series about using the Muhimbi PDF Converter Services Online in combination with Microsoft Flow, LogicApps and PowerApps, we present a simple yet powerful example for automatically converting files to PDF when they are added to OneDrive.

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 OneDrive. Once added, the file is automatically converted to PDF and stored in a different OneDrive folder. No need to install any local PDF Conversion software, all that is needed is the standard OneDrive sync client.

Remember that this is just an example, it can easily be modified to use different file services (e.g the trigger can be for files uploaded to SharePoint, Box.com, DropBox, Google Drive etc) and the resulting file can be written (or emailed) via any of the 100+ available Flow services. Convert newly added DropBox files to PDF and store the PDF copy in Google Drive, SharePoint AND send it via email? No problem! I don’t know why you’d want to do it, but this is a very flexible system.

There are many reasons for building a workflow like this one. We actually use this internally as a general-purpose PDF Converter. Office staff can drop any of the support file formats in a local folder, which is automatically synced with OneDrive using the standard OneDrive client. This triggers the flow and the converted file is written back to OneDrive and immediately synced back to the local system. Even though we wrote the underlying technology, it still looks like total magic.

 

From a high level, the Flow works as follows:

Convert to OneDrive - Overview

 

The full Flow can be found below. It is automatically created by the Flow Template named Automatically convert newly added OneDrive files to PDF, it is just a matter of filling out the blanks, specifically:

  • When a file is created – Folder: Specify the path to the OneDrive folder to monitor for new files.
  • Create a file – Folder path: Specify the path to the OneDrive folder where the converted PDF files are written to. Please make sure this folder is different from the input folder to prevent recursive flows. (Otherwise the converted PDF file will kick off the same flow, which in turn will create a copy of the same PDF file that will kick off the same flow again etc).

 

Convert to OneDrive - Detail - Part1Convert to OneDrive - Detail - Part2

 
That’s it, now publish the Flow and copy a file to the source folder. Assuming the OneDrive client is active, after a few moments a PDF file will appear in the destination folder.

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 Flow / 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: , , , , , ,

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

Posted at: 6:03 PM 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 - Part1Convert & 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: , , , , , ,

Muhimbi’s PDF Conversion facilities now available for Flow, LogicApps and PowerApps

Posted at: 3:47 PM on 24 March 2017 by Muhimbi

FlowLogo

Over the last few months we have been working with Microsoft’s Flow team to make Muhimbi’s popular PDF Conversion and manipulation facilities available to all Flow, LogicApps and PowerApps users. All this hard work has paid off as – starting today – our software is available in Microsoft’s standard list of services.

There is nothing to install or configure, just create a Flow as normal, enable a Trigger to start when an event occurs (e.g. file created in DropBox, OneDrive, Box.com, SharePoint or any of the other supported services), add an action and either search for ‘Muhimbi’ to display all our actions to convert, merge, watermark, secure or OCR – or type the name of a Muhimbi action directly, e.g. ‘Convert Document’.

Fill in the blanks - it is pretty self-explanatory but additional information is available in our Core Concepts article - and feed the generated document in a secondary Flow action, e.g. to email it or write it to a different service. That is it, for more details see the steps and screenshots in this blog post.

Muhimbi Official Flow Service


One of the cooler aspects of the way the integration works is that it works equally well in combination with other platforms including:

  1. Azure LogicApps: Available from the Azure portal, LogicApps represent the ‘grown up’ version of Flow. It provides more flexibility and control.
  2. PowerApps: Microsoft’s successor to InfoPath can be used to create powerful form solutions for PCs and mobile devices.
  3. Your own code: The underpinnings of the new Muhimbi service is REST based, and fully documented. As a result you can use it from any modern platform including C#, PHP, JavaScript, Ruby, Python, Java, SharePoint and many others. Details and sample code can be found in our GitHub repository.

 

All this new functionality is part of the Muhimbi PDF Converter Services Online (and SharePoint Online) platforms. If you have any questions then please leave a message below or contact our support desk.

.

Labels: , , , , , ,

Need support from experts?

Access our Forum

Download Free Trials