Get Signed Documents from Adobe Sign
Overview
This article introduces how to get signed documents from Adobe Sign to Kintone records using Microsoft Power Automate .
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:
- When a document is signed, it triggers Power Automate to download the signed document from Adobe Sign.
- After downloading the document, the next flow in Power Automate uploads the document to Kintone.
- 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:
- Kintone Users & System Administrators permission.
- 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 page.
- A Microsoft Power Automate account. For more plan details, refer to the Power Automate Pricing 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.
- 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. - Click New flow and then Automated cloud flow.
- 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.
- 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.
- Click the New step button
- On the Choose an operation screen, search and click Adobe Acrobat Sign.
- Click Get a PDF of a signed agreement
- Click the Agreement ID box and select Agreement ID
- 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.
- Click the New step button
- On the Choose an operation screen, search and click HTTP.
- Set the information as follows:
-
Method: POST
-
URI: https://{subdomain}.kintone.com/k/v1/file.json
-
Headers:
- Key: X-Cybozu-API-Token
- Value: API token copied from Initial Setup
-
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.
-
Click the New step button
-
On the Choose an operation screen, search for "Parse JSON" and click Parse JSON.
-
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.
-
Click the New step button
-
On the screen to choose an operation, search for "HTTP" and click HTTP.
-
Set the information as follows:
-
Method: POST
-
URI: https://{subdomain}.kintone.com/k/v1/file.json
-
Headers:
- Key: X-Cybozu-API-Token
- Value: API token copied from Initial Setup
-
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.
-
Click the New step button
-
On the screen to choose an operation, search for "Kintone" and click Update a record in an app
-
Set the information as follows:
- App ID: Kintone App ID
- Record Number: Get the Record ID from the Agreement name just like in Update the record and add the updated agreement section step 3
- Agreement No: select Agreement ID
-
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.