Add a Docusign signature to your documents

Overview

With the increasing digitization of processes, it is becoming essential to be able to sign, complete and certify receipt of a document.

That's why version 5 of Carbone brings the possibility of including signatures, initials and other elements right from the document editing stage.

This is how it works:

  • Creation of a Carbone template with the :sign format (documentation)
  • Generation of a PDF with the Carbone API, which provides :
    • PDF file
    • position of the signatures in document
  • Use the Docusign APIs to create the document and automatically configure the signatures
This feature is available in Carbone v5 and higher.

Example of implementation with Make

In this example, we'll create an employment contract that will then be signed by the employee and the employer.

1 - Template creation

In the template, simply add the tags corresponding to the signatures with the :sign. The first brace is not visible, as we recommend that it be set to the same color as the background.

Sample Carbone template with signature tag

The full template is available here:

2 - JSON Data preparation

The data sent in the signature object must contain the field type and signatory information. This is the example:

{ ...
  "company": {
    ...
    "signature_date": { "type": "date", "signer_id": 10 },
    "signature": { "type": "signature", "signer_id": 10 }
  },
  "employee": {
    ...
    "signature_date": { "type": "date", "signer_id": 20 },
    "signature": { "type": "signature", "signer_id": 20 }
  }
}

Here is the complete JSON:

3 - Setting up the sequence with Make

Here's the full implementation on Make :

Full Carbone and Docusign flow in Make.com

The blueprint export is available here :

Variable preparation

Input parameters are:

  • templateID (template was previousely uploader with Carbone Studio or with API)
  • Json data (for 2)
  • Signers list : JSON array with list of signers :
    [
      {
      	"id": 10, 
      	"name": "Anna Schneider", 
      	"email": "guillaume+anna@carbone.io"
      },
      {
      	"id": 20, 
      	"name": "Lukas Fischer", 
      	"email": "guillaume+Lukas@carbone.io"
      }
    ]
    
Carbone with Docusign flow init

Document generation

The document is then simply generated using the Carbone module:

Carbone with Docusign - PDF generation

During generation, the Carbone API provides the template ID, as well as the list of signatures in JSON format:

"signatures": 
    [
        {
            "data": {
                "type": "date",
                "signer_id": 10
            },
            "page": 2,
            "x": 108,
            "y": 362
        },
        {
            "data": {
                "type": "signature",
                "signer_id": 10
            },
            "page": 2,
            "x": 108,
            "y": 388
        },...
    ]

Adapting the format to the Docusign API

The Docusign api requires the following format :

"recipients": {
    "signers": [
        {
            "email": "signer_email",
            "name": "Name",
            "recipientId": "1",
            "addAccessCodeToEmail": false,
            "tabs": {
                "signHereTabs": [
                    {
                        "xPosition": "100",
                        "yPosition": "100",
                        "pageNumber": "1",
                        "documentId": "1",
                        "recipientId": "1"
                    }
                ],
                "dateTabs": [
                    {
                        "recipientId": "1",
                        "xPosition": "10",
                        "yPosition": "10",
                        "documentId": "1",
                        "pageNumber": "1"
                    }
                ]
            }
        },
        {
           ...
        }
    ]
},

Here is the complete documentation for API Docusign.

The following steps perform this conversion:

Carbone with Docusign - Data transform

Download PDF and call Docusign API

All that's left to do is upload the PDF file using the Carbone module, and send the document for signature using the Docusign module:

Carbone with Docusign - Signature request

4 - Executing automation

All that's left is to launch the script. The document is then generated from the template, and sent to Docusign as a signature with the fields positioned.

Mails are sent directly to the signers.

You can use all the features offered by the Docusign API to integrate signatures and more complex flows.

References

Read more