Converting and Archiving InfoPath Forms to PDF using Microsoft-Flow

Clavin Fernandes

This article is based on a post Clavin Fernandes made to his personal blog, the information in it is used with his permission. Thank you Clavin!

Ever since Microsoft announced the retirement of InfoPath, people responsible for archiving forms and maintaining their accessibility have been busy searching for alternatives to InfoPath.

Luckily, we’ve been busy with this as well! So, we started with a previous post and decided to update it here using some of the new functionality available with Microsoft Flow.

Using Flow to convert and archive InfoPath forms is a bit more involved than doing the same in SharePoint, as InfoPath uses two files to create a single form, an XML (data) file and an XSN (template) file. In this post we will create a simple Flow that is triggered whenever a form is added to a folder in a SharePoint Online Library. Once added, the form is automatically converted to a PDF stored in a OneDrive for Business folder.

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 or can even be used to Migrate your SharePoint On-Premise InfoPath Forms to SharePoint Online etc).

Before we begin:

Create the Flow

From a high-level perspective, the Flow looks as follows:

Note: Converting an InfoPath form is similar to converting any other document type using Muhimbi's Flow Actions, but - as it is needed during conversion - you need to pass in the XSN file (the file content, not the URL to the file) alongside the XML file.

The Flow consists of the following elements:

Voila- You’re finished! Now, publish the Flow and then save an InfoPath form in the SharePoint Online folder to test the Flow. After a few moments a PDF file will appear in the OneDrive destination folder.

This is just a basic example. Please keep in mind that the Muhimbi PDF Converter also comes with facilities to convert files attached to InfoPath forms as well as choosing which InfoPath view or views to convert.

For more Microsoft Flow, Logic Apps & PowerApps Tutorials and Blog posts, see our Knowledge Base.

As always, if you encounter any difficulties, please feel free to contact our friendly Support Desk for any assistance you may require.

Author

Clavin Fernandes

Clavin Fernandes

Developer Relations and Support Services @ PSPDFKit

Clavin Fernandes is a Microsoft Business Applications MVP and works in Developer Relations and Support Services for PSPDFKit.