Nintex Forms Online to PDF Conversion using Power Automate

In this post, I’ll show you how to create a simple List containing a Nintex Form Online and then associate a Power Automate(Flow) to convert the form to PDF once the form is submitted.

Prerequisites

  • Before you begin, please make sure the following prerequisites are in place.
  • Muhimbi PDF Converter Services Online full, free, or trial subscription(Sign up).
  • Appropriate privileges to create Power Automate(Flow).
  • Working knowledge of both Nintex Forms and Power Automate.

Getting started with Nintex Form

  • Navigate to your Site Collection and create a new Custom List and name it Nintex Forms Demo”.
  • Once the list has been created, add a few columns based on your requirements.
  • For this demo, I have created the columns below –
    • FirstName and LastName columns as Single line of text.
    • DOB column as type Date (no time).
    • LoginAccount column of type Person or Group.
    • Industry column of type Choice.
  • Navigate to the list and click on the Nintex Form icon.
  • Select the “New Responsive” Designer and then the following screen will be displayed:

Notice that in the ‘Configure pages’ section an ‘Attachments’ control along with ‘Submit’ and ‘Cancel’ buttons have been automatically added to the form.  The best part is that everything works right out of the box. Click ‘Publish’ and your Form is ready to be used in the SharePoint List. Note: In the next post we’ll convert a Nintex Form with Attachments.

Power Automate Configuration

Step 1 – Create a new Flow using the “Automated cloud Flow” option.

Step 2 – Enter a meaningful name for the Flow and select the “When an item is created” SharePoint trigger and click “Create“.

Step 3  – In the trigger, specify the path to the SharePoint Online list to monitor the new list item.

Step 4 – Add the Muhimbi ‘Convert HTML to PDF‘ action to the Flow Canvas and configure it with reference to the details below.

  • In the “Source URL or HTML” section shown in the image below, navigate to the “Add Dynamic Content” line and choose “Link to item” from the “Get file properties” action.
  • In the “Page orientation” field, select the appropriate option. Depending on the content and layout of the page “Portrait” may work out best.
  • In the “Media type” field, select the “Print” option from the drop-down menu. (This automatically strips out most of the SharePoint User interface).
  • Select “SharePoint Online” as the “Authentication type” from the drop-down menu.
  • You will need to enter the correct “User name” and “Password” to get authenticated with the SharePoint Online authentication that you selected in the authentication field above.
  • In the “Conversion Delay” field, enter a delay of 10000 (in milliseconds, so 10 seconds).  This delay will give the page time to load before it is converted.

If you are not comfortable with passing credentials directly in the Power Automate action and in plain text, you can create a Secret in Azure and pass this secret(link).

Step 5 – Add the SharePoint  “Create File” action to the Flow Canvas and configure it with reference to the details below.

  • For the “Site Address” in the image below, choose the correct site address from the drop-down menu.
  • Select the correct “Folder Path” where the converted PDF should be created.
  • Give a meaningful “File Name” to the created PDF, but make sure you remember to add the extension “.pdf” after the “File Name” and to make the file name unique, or multiple runs of the flow will overwrite the same file.  I recommend basing it on the source file name. You can get this by navigating to the Add dynamic content line and choosing “Name” inside the “Get File properties” action.
  • Select the “Processed file content” option, shown in the image below, to populate the “File Content” field.

All Done –  With everything in place, create a list item, and after a few seconds a PDF rendition looking similar to the following image will be placed in the output folder.

Subscribe to this blog for the latest updates about SharePoint Online, Nintex, Microsoft Flow, Power Apps, and document conversion and manipulation.

Leave a comment