DocuSign Connector

Manage documents, electronic signatures, and templates with DocuSign

DocuSign Connector

Automate your document signing workflow with DocuSign. Send envelopes for signature, manage templates, track signing status, and handle bulk sends—all from DeepChain.

Overview

The DocuSign connector provides 15 operations for managing the complete e-signature lifecycle. Whether you're automating contracts, NDAs, or routine approvals, this connector keeps documents moving through their workflow.

Authentication

DocuSign uses JWT (JSON Web Token) authentication:

auth_type: jwt
integration_key: "your-integration-key"
user_id: "your-user-id"
private_key: "{{ credentials.docusign.private_key }}"
account_id: "your-account-id"

How to set it up:

  1. Log into DocuSign Admin
  2. Go to Apps and Keys > Integration Key
  3. Create a new API application
  4. Generate and download your RSA keypair
  5. Copy the Integration Key, Account ID, and User ID
  6. Store the private key securely in DeepChain credentials

Available Operations

Operation What It Does
createEnvelope Create and send envelope
getEnvelope Get envelope status
listEnvelopes List envelopes
voidEnvelope Void (cancel) an envelope
getDocument Download signed document
listDocuments List documents in envelope
createTemplate Create reusable template
listTemplates List templates
sendFromTemplate Send envelope from template
getRecipients Get recipient info
updateRecipients Update recipients
resendEnvelope Resend envelope to signers
createBulkSend Bulk send envelopes
getBulkStatus Get bulk send status
downloadAuditTrail Get audit trail

Practical Workflow Examples

Example 1: Send Simple Contract for Signature

Send a document and request one signature:

- id: send_contract
  type: docusign_connector
  config:
    operation: createEnvelope
    emailSubject: "Please sign: {{ input.contract_title }}"
    documents:
      - documentId: "1"
        name: "Contract"
        fileExtension: "pdf"
        documentBase64: "{{ input.document_base64 }}"
    recipients:
      signers:
        - email: "{{ input.signer_email }}"
          name: "{{ input.signer_name }}"
          recipientId: "1"
          tabs:
            signHereTabs:
              - documentId: "1"
                pageNumber: "1"
                xPosition: "100"
                yPosition: "150"
    status: "sent"

Example 2: Send from Template

Use a pre-configured template with dynamic recipient info:

- id: send_from_template
  type: docusign_connector
  config:
    operation: sendFromTemplate
    templateId: "{{ input.template_id }}"
    emailSubject: "{{ input.email_subject }}"
    templateRoles:
      - email: "{{ input.signer_email }}"
        name: "{{ input.signer_name }}"
        roleName: "Signer"
    customFields:
      - name: "order_id"
        value: "{{ input.order_id }}"
      - name: "amount"
        value: "{{ input.amount }}"
    status: "sent"

Example 3: Track Envelope Status

Check if signatures are complete:

- id: check_status
  type: docusign_connector
  config:
    operation: getEnvelope
    envelopeId: "{{ input.envelope_id }}"

Then use conditional logic:

- id: check_completed
  type: conditional
  config:
    condition: "{{ check_status_1.response.status == 'completed' }}"
    true_path: "download_signed"
    false_path: "send_reminder"

Example 4: Send with Multiple Signers

Request signatures from multiple parties:

- id: send_multi_signer
  type: docusign_connector
  config:
    operation: createEnvelope
    emailSubject: "NDA - Please Sign"
    documents:
      - documentId: "1"
        name: "NDA"
        documentBase64: "{{ input.nda_base64 }}"
    recipients:
      signers:
        - email: "{{ input.primary_signer }}"
          name: "Primary"
          recipientId: "1"
          routingOrder: "1"
          tabs:
            signHereTabs:
              - pageNumber: "2"
                xPosition: "100"
                yPosition: "200"
        - email: "{{ input.witness }}"
          name: "Witness"
          recipientId: "2"
          routingOrder: "2"
          tabs:
            signHereTabs:
              - pageNumber: "3"
                xPosition: "100"
                yPosition: "200"
    status: "sent"

Example 5: Bulk Send Envelopes

Send the same document to multiple recipients:

- id: bulk_send
  type: docusign_connector
  config:
    operation: createBulkSend
    listId: "{{ input.recipient_list_id }}"
    emailSubject: "Contract Review"
    documents:
      - documentId: "1"
        name: "Contract"
        documentBase64: "{{ input.document_base64 }}"
    signers:
      - recipientId: "1"
        roleName: "Signer"

Rate Limits

DocuSign enforces API limits:

  • Free/Trial: Limited API calls
  • Standard: 100 envelope sends per hour (demo)
  • Production: 1,000 API calls per hour

Note: DeepChain handles retries automatically.

Error Handling

Error What It Means How to Fix
InvalidRecipientId Bad recipient info Check email and name
InvalidDocumentBase64 PDF not properly encoded Re-encode the PDF to base64
EnvelopeNotFound Envelope doesn't exist Verify envelope ID
InvalidAuth Bad JWT credentials Check integration key and private key

Best Practices

1. Use Templates for Consistency

Templates prevent mistakes:

operation: sendFromTemplate
templateId: "{{ credentials.docusign.nda_template_id }}"

2. Set Tab Positions Carefully

Position coordinates matter. Use DocuSign's template editor to find exact positions:

tabs:
  signHereTabs:
    - documentId: "1"
      pageNumber: "1"
      xPosition: "100"    # From left edge
      yPosition: "150"    # From top edge

3. Use Routing Order for Sequential Signing

Force one signer to complete before the next:

signers:
  - email: "first@example.com"
    routingOrder: "1"
  - email: "second@example.com"
    routingOrder: "2"

4. Encode PDFs to Base64

Your workflow framework should handle this, but ensure PDFs are base64-encoded before sending.


Next Steps