In this guide you’ll learn how to convert a Nintex Form to a PDF using Power Automate.
Nintex Forms provides a quick and easy way to create surveys and questionnaires to collect responses from different people. Even though this is useful, the completed Forms are not easily portable i.e.you cannot send this from one person to another person keeping the “Look and Feel” of the completed Form intact along with any files that have been uploaded to it.
Using Power Automate (Flow) and Muhimbi PDF Converter, you can merge all the responses and attachments into a single document along with the responses and then send that document as an email or write the generated PDF to SharePoint, OneDrive, or anywhere you can send files to using Microsoft Power Automate.
Here’s 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.
Sample Nintex Forms
You can create your sample Nintex Form by performing the following steps:
Navigate to your MS SharePoint 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.
You can create the Name column as Single line of text for our example.
Once the list has been configured, navigate to the list and click the Nintex Form icon.
Click OK button for the popup. The Nintex Form Demo opens in Nintex Forms.
Note: In the ‘Configure pages’ section ‘Submit’ and ‘Cancel’ buttons have been automatically added to the form, and these will work right out of the box.
Click Publish button and your Form is ready to be used in the MS SharePoint List.
Before we start building the workflow, ensure all prerequisites are in place. It is also assumed that the reader has some knowledge of Nintex Forms and also knowledge of building Workflows using Power Automate.
Muhimbi PDF Converter Servicesfull, free, or trial subscription.
Appropriate privileges to create Power Automate(Flow).
Working knowledge of both Nintex Forms and Power Automate.
Using Power Automate to Convert Nintex Forms to PDF
We can now start building our Flow.
Login to Microsoft Flow and select the My Flows tab. Navigate to New Flow \Automated cloud flow.
Enter a meaningful name for the Flow and select the ‘When an item is created’ MS SharePoint trigger and click Create button.
In the trigger, specify the path to the SharePoint Online list to monitor the new list item.
Add the Muhimbi ‘Convert HTML to PDF‘ action to the Flow Canvas and configure it with the details below.
- In the ‘Source URL or HTML’ section, 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 helps to strip out most of the MS 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.
Note: To pass credentials directly in the Power Automate action and in plain text without disclosing the credentials, you can create a Secret in Azure and pass this secret as well (link).
- Add the MS SharePoint ‘Create File’ action to the Flow Canvas and configure it with the details below:
- For the ‘Site Address’, 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.
- Select the ‘Processed file content’ option, shown in the image below, to populate the ‘File Content’ field.
- With everything in place, create a list item, and after a few seconds a PDF rendition will be placed in the output folder. On a high level, the workflow will look as follows: