Generate Documents from a Sharepoint List

Generate Documents from a Sharepoint List

With our Formstack Documents integration with Sharepoint, you can automatically generate contracts, NDAs, invoices & any other types of documents with a click of a button from a Sharepoint List.

This means you no longer need to manually create & deliver your documents.

To get started you'll need a Microsoft Sharepoint account, a Formstack Documents account and a Microsoft PowerAutomate account.


How to Setup Integration

Step 1:  Upload / build your document template in Formstack Documents

To get started, we’re going to set up the template for our document.  You can upload a word, excel, ppt, pdf template or you can use our online document builder to build out your template.  

In our example, we are going to show how to upload a word document template.

First, we’re going to set up our NDA template in Microsoft Word.  We’re going to add our logo, contact information, and then for the spots that we want to insert our customer details from our Sharepoint List, we’re going to use merge fields that look like {$Company}, {$Address}, {$Amount}, etc.

Here’s what our NDA template looks like:


Once we’ve  added all of our merge fields in our document template and have it saved to our computer, we’ll navigate to the Documents page in Formstack Documents, click the New Document button and enter a name.  On the next step, we’ll pick “I have a document I would like to use”, upload our document template & click Next.

After we’ve finished our template and saved it, we’re going to move on to the Settings tab where we can modify various options like the type of file that’s generated and the name of the file.  For this example, we’re going to produce a PDF version of the contract and we’re going to include the name of our customer in the file name.


Next, we’re going to set up the delivery of our document so that it is automatically emailed to our customer.  From the Deliver tab, click +New Delivery and choose Email.

For the To address we’re going to use a merge field for the customer’s email address.  If you don’t have a merge field in your template, choose the <<Other>> option then enter something like {$Email}.  Feel free to edit any of the other settings.

After we have saved our email delivery, we are done with the setup process inside Formstack Documents and we’re ready to setup the integration with our Sharepoint List using Microsoft Power Automate.

Step 2:  Setup Sharepoint List & Formstack Documents flow in Power Automate

You can do this by logging into your Power Automate account and clicking + Create>Instant cloud flow.

Step 3:  Name Flow & Select the Sharepoint Trigger

  • Give your flow a name of your choice.
  • Choose “Sharepoint - For a selected item” as your trigger.
  • Click Create.

Step 4:  Setup our Sharepoint List Trigger

  • Choose the Sharepoint Site the hosts your Sharepoint List
  • Choose the Sharepoint List
  • Click + New Step

Step 5:  Setup a Get action to collect data from our Sharepoint List

  • Type in Sharepoint and select the Sharepoint connector
  • Type in Get Item for the action and select the Get Item option
  • Connect your Sharepoint site that hosts your Sharepoint List
  • Select your Sharepoint List that you want to generate a document from
  • Click in the ID box and select ID file identifier from the popup menu
  • Click + New Step

Step 6:  Connect Formstack Documents

  • Type in Formstack Documents and select the Formstack Documents connector
  • Choose the Merge Document action

Once you’ve chosen your action, Power Automate will ask you to connect your Formstack Documents account with an API Key & Secret.

To create an API Key & Secret, log  into your Formstack Documents account and click Account>API Access>+ New API Key.  

Once you have your new API Key & Secret, simply copy and paste them into Power Automate to connect your accounts.  Easy!

After we’ve authenticated our Formstack Documents account, Power Automate is going to load a list of the document templates in our Formstack Documents account.

Select the template that you just set up and then Power Automate will load a list of the merge fields in your template.

For each merge field, you need to match the corresponding fields from the Sharepoint List.  This tells Power Automate how to send the data over to Formstack Documents so that it gets populated in the correct spot on your template.

After you’ve matched up all of your merge fields, go ahead and save your flow.  You’re ready for a test!  

For your test, simply login to your Sharepoint List, select a record, click Automate, click the button with the name of your flow (we named ours Sharepoint List - NDA) and then follow the prompts to run your flow.  Easy!

Your NDA will automatically be created and sent to the customer via email. Welcome to the good life of automated documents!



Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.