Docusign v2
Provides integration with Docusign, an electronic signature platform used to prepare, send, sign and track agreements, through the Docusign eSignature REST API v2.1 and the Docusign Admin API.
Use this Node to read and change Docusign data from a Workflow. For example, you can list envelopes and their recipients, create and send envelopes from templates, void envelopes, manage users, groups and templates, or read organization data through the Admin API.
Revision History
0.0.0.3 - Initial release.
Connection
Fields marked JWT Grant only or Authorization Code only appear when that AuthenticationType is selected.
| Property | Type | Description |
|---|---|---|
AuthenticationType |
Enum | JwtGrant (the default) for a service integration that impersonates one user with an RSA key, or AuthorizationCode for a user who signs in through Connect. |
Environment |
Enum | Developer (the default) for the Docusign developer environment, or Production. |
IntegrationKey |
String | The integration key (client ID) of your Docusign app. |
UserId |
String | JWT Grant only. The GUID of the Docusign user to impersonate. An email address is not accepted. |
PrivateKey |
Masked | JWT Grant only. The RSA private key for the integration key, in PEM format with its line breaks, exactly as Docusign provides it. |
SecretKey |
Masked | Authorization Code only. The secret key of your Docusign app. |
Scopes |
String | Space-separated scopes. When it is empty, JWT Grant requests signature impersonation and Authorization Code requests signature extended. Add Admin scopes, for example organization_read user_read, to use Admin operations. |
AccountId |
String | The eSignature account ID to use. When it is empty, the user's default account is used. |
OrganizationId |
String | The Admin organization ID used when an Admin operation does not supply organizationId. When it is empty, the account's organization is used. |
TimeoutSeconds |
Integer | Timeout, in seconds, for each Docusign request. It must be greater than 0. The default is 100. |
AccessToken |
Masked | Managed by the Node. |
AccessTokenExpiresAt |
String | Managed by the Node. |
RefreshToken |
Masked | Authorization Code only. Managed by the Node. |
BaseUri |
String | Managed by the Node. |
ResolvedAccountId |
String | Managed by the Node. |
ResolvedOrganizationId |
String | Managed by the Node. |
TokenCredentialFingerprint |
Masked | JWT Grant only. Managed by the Node. |
Setup Notes
Create an app (integration key) in the Docusign environment that matches Environment, then set up the Connection for one of the two authentication types.
JWT Grant
- Generate an RSA key pair for the integration key, and copy the private key into
PrivateKeywith its line breaks intact. - Enter the integration key in
IntegrationKeyand the GUID of the user to impersonate inUserId. - Grant consent for the integration key and user, including any Admin scopes you add to
Scopes. Until consent is granted, the Step fails with a message that contains the Docusign consent URL. Replace the URL'sredirect_uriplaceholder with a redirect URI registered on the app before you open it.
Authorization Code
- Add a secret key to the app, and enter it in
SecretKeyand the integration key inIntegrationKey. - Add the Flowgear OAuth callback URL,
https://app.flowgear.net/r/auth, to the app's redirect URIs. - Set
AuthenticationTypetoAuthorizationCode, and then clickConnectand sign in to Docusign. - If you change
Scopeslater, clickConnectagain so the new scopes are granted.
Account and Connection test
- Leave
AccountIdempty to use the user's default account, or enter an account ID the user can access. - Admin operations need a Docusign organization and Admin scopes in
Scopes. - Run the
Connectiontest. It reads the account without changing any Docusign data. - With Authorization Code, if the access token needs renewal, the test asks you to run a Workflow that uses the
Connectionor to clickConnectagain.
The Node runs only on the Cloud Cluster.
Methods
The Docusign Node exposes four methods, one for each HTTP verb: Query runs GET operations, Create runs POST operations, Update runs PUT operations and Delete runs DELETE operations. Select a template so Flowgear fills in the OperationId and shows the matching Options, Items and Response fields.
Query
Use Query to read Docusign records, for example listing envelopes, reading an envelope's recipients, listing users or templates, or reading Admin organizations.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Docusign Connection. |
OperationId |
String | Identifier of the GET operation selected by the template. |
Options |
Object | Route and query values for the selected operation, using Docusign's parameter names. |
| Return | Type | Description |
|---|---|---|
Response |
Array | Docusign data without a Flowgear object. A list returns one row per result, and a single record returns one row. An empty list returns zero rows. |
Create
Use Create to create Docusign records and run POST actions, for example creating and sending an envelope, creating a recipient view (signing URL), or adding users.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Docusign Connection. |
OperationId |
String | Identifier of the POST operation selected by the template. |
Items |
Array | Required. One request per item: the request body plus any route values for that item, for example envelopeId. |
Options |
Object | Query values and fallback route values. An item's own route values override these. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with the Docusign response fields and the Flowgear object with IsSuccess, Message, and Request. |
Update
Use Update to update Docusign records and run PUT actions, for example sending or voiding an envelope, or updating a user, template or recipient.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Docusign Connection. |
OperationId |
String | Identifier of the PUT operation selected by the template. |
Items |
Array | Required. One request per item: the request body plus any route values for that item. |
Options |
Object | Query values and fallback route values. An item's own route values override these. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with the Docusign response fields and the Flowgear object with IsSuccess, Message, and Request. |
Delete
Use Delete to delete or remove Docusign records, for example removing recipients from an envelope, removing users from a group or closing users.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | The Docusign Connection. |
OperationId |
String | Identifier of the DELETE operation selected by the template. |
Items |
Array | Required. One request per item with the item's route values, for example templateId, and the request body where Docusign declares one. |
Options |
Object | Query values and fallback route values. An item's own route values override these. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One row per item with any Docusign response fields and the Flowgear object with IsSuccess, Message, and Request. |
Usage Notes
- Route values, such as
envelopeIdortemplateId, are left empty in templates, so a new Step never acts on a record you did not name. - eSignature operations always run against the
Connection's account, so do not supplyaccountIdinOptions. - Each item can carry its own route values, such as
envelopeId, so one Step can act on several records. Where a route name is also a body field, such asenvelopeIdwhen updating, sending or voiding an envelope, set the route value inOptionsand use a For Each to target a different record per item. - Operations without a request body or route value, such as deleting Connect logs, run once per item, so connect
Itemswith one empty object. - Send documents inline as base64 in the
documentBase64field of envelope and template definitions. - Paging is automatic, so do not supply
start_positionorcountinOptions. - String and integer lists use comma-separated values (CSV), for example
Sales,"West, North". Enclose values that contain commas in double quotes. - Deeply nested and free-form objects, such as a signer's
tabs, are JSON text. Supply valid JSON in these fields. - A successful response that lists per-entry
errorDetailsstill returnsFlowgear.IsSuccessset totrue, so checkerrorDetailsin the row. Queryerrors fail the Step. ACreate,UpdateorDeleteitem that Docusign rejects returnsFlowgear.IsSuccessset tofalsewith Docusign's message, and later items still run. A Docusign server error, a rate limit, a timeout or an authentication failure fails the Step, and earlier items are already saved.- Docusign allows 3,000 API calls per hour per account. Do not poll an envelope's status more than once every 15 minutes; use Docusign Connect notifications instead.
Warning:
DELETE /v2.1/accounts/{accountId}closes theConnection's Docusign account. Check the template before you run aDeleteStep.
Known Issues
- File uploads and downloads are not available, including envelope and template documents, attachments and signature images.
POST /v2.1/accountsandGET /v2.1/accounts/provisioningneed Docusign distributor (reseller) credentials.GET /v2.1/accounts/{accountId}/folders/{folderId}andPUT /v2.1/accounts/{accountId}/envelopes/statusreturn only Docusign's first page of results.