Automatically generate documents from SharePoint list and send them for signature with DocuSign using Power Automate

In this tutorial, you’ll learn how to generate a document from SharePoint list data and send it for electronic signature using DocuSign. When you hire a new employee, you need to prepare a non-disclosure agreement (NDA) and have it signed. We’ll show you how to automate this process without printing documents.

SharePoint employee list and generated NDA

A new item in the SharePoint list will trigger a document generation process that uses employee data to create an NDA and sends it to the employee for electronic signature through DocuSign.

To automate the process, we’ll use the Plumsail Documents connector for Power Automate. You’ll also need a DocuSign account.

Configure document generation process

First, download the NDA template we’ve prepared for this tutorial.

To create a new document generation process in Plumsail Documents, go to the Processes section in your Plumsail account.

Click the Add process button:

Add process button

Select Upload a document, upload the downloaded NDA template, enter a process name, and select PDF as the output file type.

create a new process

Click Create to proceed to the next step.

Configure document template

After creating the process, you’ll see a preview of the uploaded NDA template:

NDA template preview

You can modify the template using the Online Editor or upload a different file if needed.

Word DOCX templating syntax

You may notice {{tokens}} in the document template. We’ve highlighted them in orange to show how the templating syntax works.

Everything enclosed in {{curly braces}} is a token that will be replaced with actual data during document generation. In our example, {{employee}} will be replaced with the employee’s name, and {{date}} with the agreement’s effective date.

We also use the format function to display the date in the required format:

{{date|format(MM/dd/yyyy)}}

You can learn more about tokens, value functions, and other features in the Word DOCX templates documentation.

Place signature tags into the document template

Besides Plumsail Documents tokens, you can add special DocuSign tags to your template to specify where signatures, names, dates, and other signing information should appear. These tags, also called anchor text, allow DocuSign to automatically position signing fields in the document.

Each tag identifies a field type and signer number and is enclosed in backslashes.

For example:

  • \s1\ - the signature field for the first signer

  • \n1\ - the first signer’s name

  • \d1\ - the date when the first signer signs the document

In our example, we’ve placed these tags at the end of the NDA template and made them invisible by changing the font color to white:

DocuSign anchor text in template

Here’s how the document appears to signers. Names and signing dates are filled in automatically:

DocuSign anchor text result

For more information, see Use signature and related tags in DocuSign in our documentation.

Configure process and template settings

After configuring the NDA template, you can adjust the process and template settings. Click the gear icons to open the corresponding settings:

settings substep

Process settings control how the process runs. Here you can configure:

  • Process mode. By default, new processes are in Testing mode. Documents generated in this mode have a Plumsail watermark, but executions are free. Switch to Production mode to generate documents without the testing watermark.

  • Timezone and locale. Define how dates, times, and numbers are formatted.

  • Output files. If your process contains multiple templates, you can choose how the generated documents are combined: keep them as separate files, merge them into a single PDF, or package them into a ZIP archive.

Template settings control the generated document. Here you can:

  • Template name. Set a name to identify the template within the process.

  • Output filename. Customize the generated file name using tokens from the template, such as {{employee}}.

  • Output file type. Choose the format of the generated document. In our example, we use PDF.

  • Template engine. Select the Modern or Classic engine depending on the syntax used in your DOCX template. Modern is selected by default.

  • Conditionally run template. Set conditions to generate the document only when specific criteria are met.

Hint

We recommend testing your document template after making changes to ensure everything works as expected. Learn more about testing document templates.

Send document to DocuSign for signing

Now let’s configure the delivery to automatically send generated NDAs to employees for electronic signature.

In the Process panel, click the plus icon next to Delivery and select DocuSign.

Connect your DocuSign account. You can choose between two environments:

  • Sandbox - for testing the signing process. You’ll need a DocuSign demo (developer) account.

  • Production - for sending actual documents for electronic signature.

Add connection to DocuSign

Once connected, you can configure the DocuSign delivery settings.

  1. Enter the email subject and message that recipients will receive. You can use template tokens to personalize the email content.

  2. Add recipients and assign their roles. You can specify recipients manually or use tokens to populate their names and email addresses dynamically.

In our example, we have two signers. For the employee, we use the {{employee}} and {{employeeEmail}} tokens to populate their name and email address from the SharePoint list. For the CEO, we enter a fixed name and email address since these remain the same for every document.

DocuSign general settings
  1. Expand the Advanced section to configure additional options.

In our example, we enabled Sequential signing to specify the order in which recipients must sign the NDA:

DocuSign advanced settings

You can change the signing order by dragging and dropping recipients:

Drag and drop recipients to change the sequence of signing

The DocuSign delivery is now configured. You can add multiple deliveries to the same process. For example, you can also add a SharePoint delivery to save generated NDAs to a SharePoint document library.

See the full list of deliveries and how to set them for more information.

Start process to create NDA and send to DocuSign

There are several ways to start a document generation process. In our example, we’ll use Power Automate to automatically generate an NDA when a new employee is added to a SharePoint list.

In the Process panel, click Run Process and select Power Automate from the available triggers:

start process from Power Automate

You can create an automated cloud flow from scratch or use this ready-made Power Automate template.

Follow the steps below to configure the flow.

Create and configure Power Automate Flow

Let’s create a Power Automate flow that automatically generates an NDA and sends it to DocuSign when a new employee is added to the SharePoint list.

Here’s what the completed flow looks like:

Power Automate flow for DocuSign

When new employee is added to SharePoint list

In Power Automate, create an automated cloud flow and select the When an item is created trigger from the SharePoint connector.

Configure the following fields:

  • Site Address - select the SharePoint site containing your employee list.

  • List Name - select the list where employee information is stored.

Flow trigger on SharePoint item creation

Start process of generating agreements

Next, add the Start document generation process action from the Plumsail Documents connector. This action will start the NDA generation process we’ve configured earlier and send the resulting document to DocuSign for electronic signature.

If you’re using the Plumsail Documents connector for the first time, you’ll need to create a connection. Enter a connection name, such as Plumsail Documents, and provide your API key. You can create an API key in your Plumsail account.

Make sure to select the same Data center location as configured in your Plumsail account.

Create a connection to Plumsail Documents

Configure the action fields:

  • Process Name - select the NDA generation process you created earlier.

  • Template Data - enter JSON data using dynamic content from the SharePoint trigger to populate the document template.

Start document generation process

Save and test the flow by adding a new employee to your SharePoint list. Here’s an example of the resulting document after signing:

Generated NDA signed electronically by two recipients in DocuSign

Use result document in Flow

You can continue working with the generated document in Power Automate. In our example, we’ll save a copy of the NDA to a SharePoint document library.

Add the Create file action from the SharePoint connector and configure the following fields:

  • Site Address - select the SharePoint site where you want to save the document.

  • Folder Path - choose the document library and folder where the NDA will be stored.

  • File Name - enter a name for the document, including the .pdf extension. You can use dynamic content from the SharePoint trigger to include the employee’s name in the file name.

  • File Content - select Result file from the Start document generation process action using Dynamic content.

save resulting document to sharepoint library

Note

This action saves the generated NDA before it is signed. To save the signed document after the DocuSign signing process is completed, see Track DocuSign envelope status and save signed documents to SharePoint.

Conclusion

We’ve automated the process of generating non-disclosure agreements from SharePoint list data and sending them to employees for electronic signature through DocuSign. You can use a similar approach to generate and sign other documents, such as contracts, applications, and agreements.

Plumsail Documents can also generate documents using data from many other applications. Explore the available integrations for more examples.

If you have any questions, feel free to contact us at support@plumsail.com.