Get Signed Documents from Adobe Sign

Contents

Overview

This article introduces how to get signed documents from Adobe Sign (External link) to Kintone records using Microsoft Power Automate (External link) .

The workflow used in this article is based on the Create and Email Documents with Adobe Sign article. It is recommended to read that article before this current article.

General Flow

The general flow of the operation is as follows:

  1. When a document is signed, it triggers Power Automate to download the signed document from Adobe Sign.
  2. After downloading the document, the next flow in Power Automate uploads the document to Kintone.
  3. Finally, it updates the Kintone record by changing the status to Complete

Required Environments

In addition to a Kintone environment, the following will also need to be prepared:

  1. Kintone Users & System Administrators (External link) permission.
  2. An Adobe Sign account to act as the agreement creator and email sender. For more plan details, refer to the Adobe e-signature plans and pricing (External link) page.
  3. A Microsoft Power Automate account. For more plan details, refer to the Power Automate Pricing (External link) page.

Initial Setup

Refer to the Create and Email Documents with Adobe Sign - Initial Setup article and follow the steps to create the sample App.

Set up the Integration

This section explains how to create a workflow from when an agreement is signed in Adobe Sign until the signed agreement is sent back to Kintone.

Create a flow

With Microsoft Power Automate, create a new workflow.

  1. Sign in to Microsoft Power Automate and click My flows on the menu displayed on the left side.
    In Microsoft Power Automate, an integration workflow is called a flow.

  2. Click New flow and then Automated cloud flow.

  3. Enter any name for the flow. Then, enter "Adobe Sign" in the Search all triggers search box to search for a trigger. Click When an agreement workflow is completed successfully and then click the Create button.

  4. Enter any name and select Any of my agreements for the Scope

Get a PDF of a signed agreement

Create a flow that will trigger when a document is signed in Adobe Sign. This flow downloads the PDF file of the document.

  1. Click the New step button
  2. On the Choose an operation screen, search and click Adobe Acrobat Sign.

  3. Click Get a PDF of a signed agreement

  4. Click the Agreement ID box and select Agreement ID

  5. Progress can be saved anytime by clicking the Save button

Upload the signed agreement to Kintone

Create another flow to upload the document to Kintone.

  1. Click the New step button
  2. On the Choose an operation screen, search and click HTTP.

  3. Set the information as follows:
    • Method: POST

    • URI: https://{subdomain}.kintone.com/k/v1/file.json

    • Headers:

    • Body:

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      
      {
      "$content-type": "multipart/form-data",
      "$multipart": [
         {
            "body": xxxxx,
            "headers": {
            "Content-Disposition": "form-data; name=\"file\"; filename=Complete.pdf"
            }
         }
      ]
      }
      

      Select Body for the xxxxx

Convert JSON to variable

Convert JSON returned from the previous flow by using parse JSON.

  1. Click the New step button

  2. On the Choose an operation screen, search for "Parse JSON" and click Parse JSON.

  3. Set the information as follows:

    • Content: select Body

    • Schema:

      1
      2
      3
      4
      5
      6
      7
      8
      
         {
            "type": "object",
            "properties":{
            "fileKey":{
            "type":"string"
               }
            }
         }
      

Update the record and add the signed agreement

Upload the file to Kintone via API call.

  1. Click the New step button

  2. On the screen to choose an operation, search for "HTTP" and click HTTP.

  3. Set the information as follows:

    • Method: POST

    • URI: https://{subdomain}.kintone.com/k/v1/file.json

    • Headers:

    • Body:

       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      
      {
      "app": 32,
      "id": xxx,
      "record": {
         "complete": {
            "value": [
            {
               "fileKey": "xxxxxxxxxxxxxx"
            }
            ]
         }
      }
      }
      

      Get the Record ID from the Agreement name "PDPA Agreement - {record id}":

      • Click on the space beside "id", and a pop-up window will appear. Then click the Expression tab and enter "substring()".
      • Here, the first parameter is the string from which the substring is taken, in this case, the "Agreement name". So click the Dynamic content tab and choose Agreement name. The second parameter is the index of where the substring begins in parameter 1, so enter 17. The function looks like this:
        substring(triggerOutputs()?['body/agreement/name'],17)
      • Then click the OK button.

      For fileKey, select fileKey.

Update the status of the record to complete

Finally, create another flow to update Kintone records.

  1. Click the New step button

  2. On the screen to choose an operation, search for "Kintone" and click Update a record in an app

  3. Set the information as follows:

  4. Click Save

Test the flow

Now, test that the above workflow is triggered when an agreement is signed in Adobe Sign.

Sign the agreement created in the previous workflow Create and Email Documents with Adobe Sign.

Once signed, it will trigger the flow and automatically update the Kintone record with the completed agreement.

Below is the workflow screen when the test is a success.