Although at the time of writing (October 2016) Microsoft’s cool new Flow platform is not yet officially available, our support team is quickly turning into Flow junkies. Problems that are difficult to solve using regular SharePoint Designer workflows are absolutely trivial to crack using Flow.
Today we are describing a solution to what is a top 5 support request, at least for our support team, which is to automatically convert a file to PDF using a workflow and sending the result via email as an attachment. You’d think this is easy to achieve in a SharePoint Designer workflow as that comes with an e-mail action, however that action does not support attachments. Bummer!
Read on to find out how easy it is to solve this problem.
In SharePoint Online (or on-premise if you have configured a gateway) make sure you have access to two different Document Libraries. This example can be combined to use only a single library, but things are slightly easier when using two. Let’s name our libraries Auto Convert Files and Email Files.
As at the time of writing Muhimbi’s workflow actions are not (yet) available in Flow, we need to create a SharePoint Designer workflow to carry out the conversion to PDF. Navigate to the Auto Convert Files Library and create a new SharePoint Designer Workflow (Library tab / Workflow Settings / Create a Workflow in SharePoint Designer).
Name your workflow Convert to PDF, set it to automatically start when a new file is created, convert the Current Item to Email Files/ (including the trailing slash), in PDF format and Exclude metadata. Too cryptic, have a look at this demo video (that uses slightly different parameters, but illustrates the concept).
Close SharePoint Designer and check that the new workflow works by uploading a new file to Auto Convert Files. After a few seconds the PDF rendition should be placed in the Email Files Document Library.
It is time to create the Flow that picks up the newly converted file and send it via email. On the My Flows screen select the option to create a New flow from blank.
The trigger that starts the flow must be defined first, enter SharePoint when a file is created and select the displayed trigger. Enter the site collection and Email Files document library (use the Library picker if needed).
With the fields filled out, click New Step followed by Add an Action.
There are several built in email related actions (Outlook, Office 365 Outlook, SMTP), but in this example we use the basic Mail – Send email action. Select it and accept the terms & conditions if needed.
Fill out the recipient, subject etc and click Show Advanced options. Select the Attachment field and select File content from the Dynamic content picker. Similarly for the Attachment file name, select File name.
That is it, enter an appropriate name for the flow at the top of the screen and click the Create Flow option. You can later extend the flow by adding a SharePoint Delete File action to delete the original file if that is no longer needed.
On the My Flows screen make sure the newly created flow is enabled. Upload a file to Auto Convert Files and after a few seconds an email will be delivered with a copy of the converted file.
Naturally this is not limited to PDF Conversion, it works with any file generated by our various workflow actions including Merge, Watermark, Secure and OCR operations. The current flow always sends the email to the same recipient, this can easily be extended to take the recipient from a separate column by querying that column in Flow.
During the previous 8+ years we have made it a habit to announce new software releases – for our on-premise software – at the time it became available for download. However, because releasing updates for an online service, where we maintain the entire back-end, doesn’t require any end-user involvement, we haven’t always done such a good job where it comes to announcing new versions of the Muhimbi PDF Converter for SharePoint Online / Office 365.
That changes today as we formally announce the availability of version 9.8, the 8th release since the product first became available in June 2015. An overview of all recent and historical changes can be found below.
Please note that all SharePoint Online versions are numbered in the 9.X range. At the time of writing the most recent version of the on-premise software is 8.1.
The number of new features and changes is almost too large to list, but include support for Site Workflows, Reusable workflows, the ability to install the App in SharePoint 2013 / 2016, support for the new Document Library experience, real-time watermarking, a brand new website for SharePoint Online and much much more.
If you are an existing customer, or installed a trial version before October 2016, then we recommend upgrading the App and installing the latest workflow actions. (Especially as Microsoft has deprecated certain types of sandbox solutions and caused some issues when they introduce the new Document Library experience)
For those not familiar with the product, the Muhimbi PDF Converter for SharePoint Online is a lightweight subscription based solution that allows end-users to merge, split, watermark, secure, OCR and convert common document types - including InfoPath, AutoCAD, MSG (email) MS-Office, HTML and images - to PDF using SharePoint Online through a friendly user interface or via workflows, without the need to install any client side software or Adobe Acrobat. More details can be found on the product page.
Deploy App Store Add-in to SharePoint Online or on-premise.
In addition to the changes listed above, some of the main changes and additions in the new version are as follows:
The 'Split' Workflow action does not recognise the default 'interval' value.
The List ID variable is not created by merge activity for some tenancies.
One of the key advantages of deploying Apps in SharePoint Online, or at least App Store Apps, is the ease of installation, it is absolutely trivial. A quick search in the App Store followed by another click to install a complex product and you are done. No need to involve IT staff, plan capacity, assess risk, install dependencies, monitor servers and maintain systems. It doesn’t get much easier (for the customer, now we get to do all the hard work in our hosting environment :-)
Well, and I guess you can see where this is going, today we are doing exactly that. Providing your SharePoint 2013 / 2016 SharePoint environment has been set up to integrate with the Office Store, you can install both our SharePoint Online App and Workflow Actions on-premise using the click of a button. Brilliant!
While installation of the App is easy, please make sure that:
None of these requirements are specific to Muhimbi’s Apps / Add-ins. Most Apps, at least the non-trivial ones, require the same one-time SharePoint configuration.
So, what else do you need to know?
Although from a functional perspective the App is largely identical to the traditional on-premise product, the license is completely different. The App is subscription based, regardless of the environment it is installed in. For details about the various subscriptions, see this overview.
Although we aim for full feature parity between the App and the traditional PDF Converter for SharePoint, there are some differences. The App does not directly integrate with Nintex Workflow (Nintex for Office 365 does not support 3rd party add-ins at the time of writing). Our API is also not (yet) available from the App. If you need either of these functions then please reach out to our support desk for the appropriate workarounds. An overview of the key differences and similarities can be found in this Knowledge Base article.
App Store integration is only available in SharePoint 2013 and later. This does not work on older SharePoint versions such as 2007 or 2010. Please install our on-premise software in those environments.
With the modern App being available on-premise, you may think that we will no longer focus development on our traditional on-premise products. This is not the case, we have a very complete and actively developed roadmap for both products and will continue to develop each separately. We pride ourselves on never leaving any customers behind, which is why every new version of our on-premise products still supports SharePoint 2007 and Windows Server 2003. (Yes, many people still run that combination, and we don’t mind that they do)
Any questions or comments? Please leave a message below or contact us, we love talking to our customers.
From time to time our support desk is asked how to convert or move files to a different site collection in SharePoint Online / Office 365 in combination with our popular PDF Converter for SharePoint Online. Unfortunately the answer is always something along the lines of ‘this is not possible using SharePoint Designer Workflows as there are clear security boundaries between site collections’.
A detailed description of Flow is beyond the scope of this post, but let’s just say that it is the spiritual successor to SharePoint Designer, at least from a workflow perspective, with the key differentiator being that it is all modern and web-based, and – more importantly – not tied into SharePoint. It can integrate with many systems (BaseCamp, DropBox, Onedrive, Dynamics CRM, SalesForce) SharePoint being just one of them.
Although our developers are working hard to directly integrate our existing SharePoint Online Workflow Actions with Microsoft Flow - basically creating Flow specific versions that can be used from any platform - for now the solution is to first create a SharePoint Designer workflow to convert a file to PDF, which in turn invokes Flow to move the file to the destination Site Collection.
Read on for details about how to achieve this. Naturally this same technique also works for copying ANY file between site collections, it doesn’t need to come out of our Converter. The same technique can be used to copy files to and from OneDrive, DropBox and any other supported system.
If not already done so, in Flow navigate to My Connections and set up a SharePoint connection.
In SharePoint Online make sure you have access to two different site collections. In this example we have named them SourceSite and DestinationSite.
Determine the name of the source and destination Document Libraries and folders, in our example the source folder is the root of the TransferToOtherSite Document Library. The Destination folder is in the Shared Documents library, specifically the FromOtherSite folder.
In this example we first create a SharePoint Designer Workflow (on the Source Site) that converts a file to PDF and writes the resulting file to the TransferToOtherSite Document Library. Your scenario may be different, but a short video about how to create such a workflow can be found in our Knowledge Base.
With a process setup that automatically places files in the source location, it is time to create a new process in Flow. On the My Flows screen select the option to create a New flow from blank.
The trigger that starts the flow must be defined first, enter SharePoint when a file is created and select the displayed trigger. Enter the source site collection and folder (use the Folder browser if needed)
With the fields filled out, click New Step followed by Add an Action.
Enter SharePoint create file and select the appropriate action. You may be tempted to use the SharePoint Copy File action, but that is limited to copying files within the SAME site collection.
Fill in the blanks, for details see the screenshot below. Naturally substitute the sample site and folder names with your own.
That is it, enter an appropriate name for the flow at the top of the screen and click the Create Flow option. You can later extend the flow by adding a SharePoint Delete File action to delete the original file if that is no longer needed, in effect moving the source file.
On the My Flows screen make sure the newly created flow is enabled. Create a file in the source location, either by kicking off the SharePoint Designer workflow or manually placing a file in the source folder. After a few seconds a copy of the file should show up in the destination site collection.
This is just a start, using some very simple steps Flow allows very powerful integration scenarios. By just adding one more action I was able to also copy the source file to my OneDrive folder, which in turn synced the file to my local system.
This allowed me to create a cool Flow where I have a local OneDrive folder that I can drop any file in, which is then synced automatically to OneDrive, which kicks off a Flow that converts the file to PDF, write it to another OneDrive folder, which in turn is synced back to my local system. A universal Desktop PDF Converter using just a few Flow actions… awesome!
For more details about Muhimbi’s workflow actions for carrying our Conversion, Merging, Watermarking, Securing and OCR of files, have a look at our website.
There are plenty of reasons for InfoPath to PDF conversion, chief among them are data compliance, data storage, and data sharing.
Compliance needs are the most obvious reason for PDF conversion. SharePoint is one of the most popular platforms for professional organizations to manage their documents and once any organization gets large enough, or ventures into specific fields, they run into a slew of acronyms like SOX or HIPPAA. This means dealing with new data security and preservation regulations.
For example, HIPPAA mandates records be kept for at least six years, sometimes with very specific metadata requirements. Storing those records isn’t just about finding space for the 1’s and 0’s, but rather keeping it in a way that is useful, maintainable, and properly accessible.
This brings us to the second point on archiving InfoPath data: there are two separate files to be stored, and those files have to be kept in sync.
An InfoPath form itself is an XSN file, but the data that a user enters into it is stored as an XML file. If only the XML data is kept and the XSN file lost, the data is meaningless, as the XML has no context on its own. Even if both files are kept, there are still issues that can arise.
Re-creating a completed form requires a user to have privileges to access both files, which is uncommon. Over time storage servers housing the XML data may be changed or upgraded, so server naming conventions would have to be exactly the same so that file locations are maintained. Lastly, upgrading to newer versions of SharePoint (or moving to a cloud solution) means that URL locations of the form will make life much more difficult.
Since both files are needed to recreate a completed form, sharing information can be challenging. Either both files must be sent independently and recombined by the recipient (a complex task), or another type of file needs to encapsulate the data in a meaningful way.
The most obvious solution for the InfoPath preservation problem is to keep the data as a single file type that shows both the form and the data being entered. Of the different types of files that can do this, PDFs are clearly the best choice; it is accessible, and familiar to almost every user and device. Converting to a PDF can be done as part of a Nintex, K2, SharePoint Designer or Visual Studio workflow using Muhimbi’s range of server based PDF Converters, automatically archiving data for security. Plus, advanced features like watermarking, inserting QR codes and PDF/A make Muhimbi the default choice for Converting InfoPath to PDF.
If you haven’t yet used the Muhimbi PDF Converter it’s super easy, and if you already manage workflows you won’t have any issues getting it set up.
One of the key reasons our customers love our popular range of server side PDF conversion and document automation products is the ability to automate processes. A friendly user interface to convert and merge files into a single PDF is nice and all, but being able to automate business processes using SharePoint workflows is where our products really shine.
To keep everything consistent for our customers, we have always made sure that - regardless of the workflow platform used - all our workflow actions look and behave exactly the same. This has always worked well for us, but sometimes the underlying workflow platform throws a spanner in the works.
This post provides more details about recent changes that affect the SharePoint 2013-2016 Workflow Manager as well as SharePoint Online’s ‘SP2013’ workflow engine.
Look at all the cool workflow actions.
Before going into more detail, for the sake of simplicity and clarity let’s agree that the SharePoint 2013-2016 Workflow Manager and SharePoint Online’s ‘SP2013’ workflow engine are identical, and refer to both these workflow engines as the Workflow Manager. (They are based on the same technology, but the implementation is different.)
The previous version of our Workflow Manager actions worked well. However there was room for improvement in the following areas:
Reusable Workflows: In the ‘old style’ SP2007-2010 workflow engine, reusable workflows worked pretty much the same as regular list workflows. It was possible to create one generic workflow and assign them to any list with little additional effort. This behaviour was changed in the Workflow Manager, which makes it much more difficult to carry out a lookup against a list that is not fixed at design time. Our new workflow actions address this by allowing the path to the input file to be specified at run-time. Confused? Keep reading, examples are provided below.
Site Workflows: As Site Workflows are not associated with a specific List or Library item, Site Workflows were previously not supported. Fortunately, the same change that allows Reusable Workflows to work bettermakes it possible to integrate our software in Site Workflows.
So what has changed? Have a look at the old and new workflow sentences for the Convert Document action (the same change has been made to all other workflow actions)
Old Workflow Sentence
New Workflow Sentence
As you can see, the change is simple. Previously it was a requirement to specify the document using a workflow look-up. Usually the workflow developer would specify ‘Current Item’ to refer to the document that started the workflow. However, it was also possible to carry out a lookup on a different, but always the same, list. Less than ideal when it comes to reusable workflows.
The new Workflow Sentence changes ‘this document’ to ‘this document or this source file’. As a result the new workflow actions are fully backwards compatible, any workflow created using the old actions will work just fine using the new ones. However, it is no longer necessary to always use a workflow lookup as this source file is a text field that accepts a file path.
Entering static text for the input file will rarely be the right solution as very few workflows always act on the same source file. The solution is to generate the path to the source file at run time, e.g. by storing it in a workflow variable. Alternatively you can carry out a lookup for the Encoded Absolute URL on the current item as per the screenshot below.
This works particularly well for reusable workflows. Regardless of the list the workflow is associated with, this will always point to the item that the workflow was started on. For details about specifying paths using Muhimbi’s software, see this blog post.
A tutorial showing how to create re-usable workflows is outside the scope of this post, but please keep in mind that after publishing a reusable workflow it needs to be associated to a list or library using the ‘Add a Workflow’ option.