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

  1. Generate an RSA key pair for the integration key, and copy the private key into PrivateKey with its line breaks intact.
  2. Enter the integration key in IntegrationKey and the GUID of the user to impersonate in UserId.
  3. 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's redirect_uri placeholder with a redirect URI registered on the app before you open it.

Authorization Code

  1. Add a secret key to the app, and enter it in SecretKey and the integration key in IntegrationKey.
  2. Add the Flowgear OAuth callback URL, https://app.flowgear.net/r/auth, to the app's redirect URIs.
  3. Set AuthenticationType to AuthorizationCode, and then click Connect and sign in to Docusign.
  4. If you change Scopes later, click Connect again so the new scopes are granted.

Account and Connection test

  • Leave AccountId empty 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 Connection test. 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 Connection or to click Connect again.

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 envelopeId or templateId, 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 supply accountId in Options.
  • 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 as envelopeId when updating, sending or voiding an envelope, set the route value in Options and 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 Items with one empty object.
  • Send documents inline as base64 in the documentBase64 field of envelope and template definitions.
  • Paging is automatic, so do not supply start_position or count in Options.
  • 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 errorDetails still returns Flowgear.IsSuccess set to true, so check errorDetails in the row.
  • Query errors fail the Step. A Create, Update or Delete item that Docusign rejects returns Flowgear.IsSuccess set to false with 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 the Connection's Docusign account. Check the template before you run a Delete Step.

Known Issues

  • File uploads and downloads are not available, including envelope and template documents, attachments and signature images.
  • POST /v2.1/accounts and GET /v2.1/accounts/provisioning need Docusign distributor (reseller) credentials.
  • GET /v2.1/accounts/{accountId}/folders/{folderId} and PUT /v2.1/accounts/{accountId}/envelopes/status return only Docusign's first page of results.