Populate PDF forms from SharePoint in Power Automate

Note

One of our customers has voluntarily recorded an overview of a business case for the process of collecting data from PDF forms and automatically filling them. You can watch the video in addition to reading the article.

How to automate PDF form filling

In this article, you will learn how to automatically populate fillable PDF forms in Power Automate (Microsoft Flow) or Azure Logic Apps. We will use Fill in PDF Form action from Plumsail Documents connector.

In our case, we will fill in an Application for Employment form based on the data that we import from a list in SharePoint Online. Actually, you can get data from any other source. We use SharePoint list here as an example.

For example, you could place Plumsail Form on your website and trigger your flow on form submission. Also, you could extract data from incoming email messages and use this data to fill in your form.

This is how the final PDF document with the form will look in our case:

fill-in-pdf-form-result

Our template and result document have to be stored somewhere. Power Automate (Microsoft Flow) has a lot of connectors for different systems. Here are just a few of them:

  • SharePoint

  • Box

  • OneDrive

  • Google Drive

  • Dropbox

  • SFTP

  • File System

In this example, we will store the initial fillable PDF form and filled PDF documents in a SharePoint document library.

Create fillable PDF

Follow this instruction to create a fillable PDF. Download the template file for this article.

fill-in-pdf-form-template

Create Power Automate (Microsoft Flow)

Now let us review the flow and learn how it is implemented:

fill-in-pdf-form-flow

Flow trigger

You can actually pick any trigger. For example, you can start Flow on form submission. We use “When an item is created” trigger to get the newest created item from the SharePoint list.

Our SharePoint list has the same columns as fields in our fillable PDF file.

Get file content action

This action gets file content of the source fillable PDF file from a SharePoint document library. You can just specify SharePoint site URL and path to the fillable PDF that we created earlier.

fill-in-pdf-form-flow-get-file

You can use any other connector to get files from your system.

Fill in PDF form action

Fill in PDF form is the action from Plumsail Documents connector. You can use this action to fill PDF forms.

There are three parameters:

  1. Content of the PDF document

  2. JSON data

  3. Lock form fields

In the first parameter ‘Content of the PDF document’, you can put file content from some other action. In our case, we specified the output of the previous action as a source fillable PDF.

In the second parameter ‘JSON data’ you can put a JSON object as a source data to fill in your form. Please make sure that you specified the same property names as you used in your fillable PDF. Thus, the action will match properties to fields in PDF and fill them.

Activate third parameter ‘Lock form fields’ if you want to lock the fields after filling the PDF form.

Send an Email action

Now you need to send the PDF file with filled in form. In our example, we used ‘Send an Email’ action from Office 365 Outlook connector.

Please notice how we specified the PDF file. It is essential to specify attachment name with the correct extension.

fill-in-pdf-form-flow-create-file

You can use any other connector to send or store documents in your system.

Conclusion

Take control of your document automation with the Fill in PDF form action from Plumsail Documents connector for Power Automate (Microsoft Flow). Ready to dive in? Register free trial now and discover how effortless it is to revolutionize your workflow!