How to create a document from a template in Power Automate (Microsoft Flow) and sign it using AdobeSign

This article is a ready-to-use solution on how to create a PDF document from a template and sign it using AdobeSign.

With the help of Processes, we will create a purchase agreement from a DOCX template, save in SharePoint document library and send for signing using the AdobeSign connector for Power Automate (Flow).

This is how the result document will look after signing:

signed contract

Configure the Process

Before creating the Flow, we need to set a Process, which will create our purchase agreement in PDF format from a DOCX template.

Create a new process

First, go to the Processes section in your Plumsail account.

Click on the Add process button.

add process button

Set the Process name.

create a new process

Upload the template you're gonna use. In this example, we'll create a PDF purchase agreement from a DOCX template. And below is our template's screenshot. You can download it by this link.

Agreement DOCX template

When creating your own templates, mind the templating language. Plumsail Word DOCX templates use a different approach than most other templating solutions. It uses a minimal amount of syntax to make your work done.

In short, the templating engine thinks that everything between curly {{ }} brackets is variables where it will apply your specified data. Read this article to get familiar with the templating engine.

Configure a template

Once you're done with the first step Create Process, press the Submit button, and you’ll proceed to the next – Configure Template:

  • Fill in the name of the result file
  • Select PDF format for the output file
  • Protect the result PDF if you wish
Configure template

You can test a template as well, to see how it will look at the end. After clicking on the Test template button, you’ll need to ‘feed’ a template with your data in JSON format. In our case, it might be the following:

JSON data

{
    "Number": "432",
    "execution.date":"2020-05-25",
    "delivery.date":"2020-05-30",
    "buyer.name":"LUCKY LLC",
    "buyer.address":"55 Main St.New York NY 97203 USA",
    "company": {
       "email": "sales@sample.com",
       "address": "3 Main St.New York NY 97203 USA",
       "phone": "202-555-0131",
       "name": "Plumsail LLC"
    },
    "items": [
        {
            "product": {
               "name": "Monitor",
               "price": 99
             },
            "quantity": 10,
            "cost": 990
            },
            {
            "product": {
                "name": "Fridge",
                "price": 4219.99
            },
            "quantity": 1,
            "cost": 4219.99
          }
    ],
    "total": 5209.99
}
test template

Delivery

The next step is delivery. For demonstrating purpose, we’ll store the result file in OneDrive. But there are other options.

Select the folder where the ready document will be saved. Fill in the file's name. You don't need to put .extension, it'll be done automatically based on the output file type you set on the Configure template step.

onedrive-delivery

You can configure as many deliveries as you need.

Start the Process

We will start our Process from Power Automate (Flow).

Create a Flow

This is how our Flow looks:

Create an agreement and sign with AdobeSign flow

Check out the Flow steps described below.

Flow trigger

After you’ve opened My Flows, create a new one, and select a trigger. You can pick any, for example, trigger a Flow when an opportunity in CRM is closed, or a new item is added to SharePoint list. We will pick 'Manually trigger a Flow' just for demonstration purposes.

Start document generation process

This is the action from Plumsail Documents connector. This action is suitable for starting the Process of generating documents from a template. You can find more information about this action by visiting this page.

Mind, If you use the Plumsail documents action for the first time, you’ll be asked for 'Connection Name' and 'Access Key'. You can type any name for the connection. For example, 'Plumsail Documents'.

Then create an API key in your Plumsail Account page, copy and paste it to the 'Access Key' field.

The Start document generation process action has two parameters:

  • Process name. Select the process you need from available ones.
  • Template data. Specify source data in JSON format as we did on the step of testing the template.
Template data

Create file

Use this action to store the completed agreement in SharePoint document library. Specify a SharePoint site URL, a library, the name of the document with .PDF extension, and for File content choose Result file – an output from the Start document generation step.

create_file

Create an agreement from a document URL, and send for signature

This action creates an agreement, saves it in the AbobeSign account and sends it to your partner for signature.

You can put any name for 'Agreement name'.

For Document URL field select an output from the previous step, and add ?download=1 to make the link direct. Otherwise, it won’t work.

Don’t forget to specify a file extension with .PDF

adobesign_action

The Flow is ready. Now you know how to simplify your workflow processes with the help of Processes by Plumsail Documents and its connector for Power Automate (Flow). If you haven't a Plumsail account yet, sign up to get started.

Hint

If you use a SignNow system for e-signs or just want to compare AdobeSign with an alternative, read our article How to create a document from a template and sign it using SignNow.