docusign.create-envelope
Create a DocuSign envelope from documents fetched by presigned URL — draft by default, sent with send=true
Create a DocuSign envelope (draft or sent) from URL-fetched documents.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-docusign |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped DocuSign CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
documents | list | Yes | — | 1–10 documents as {name, url, file_extension?}; url is an HTTPS presigned GET (vaulted — never persisted in plain) |
recipients | list | Yes | — | 1–50 signers as {email, name, routing_order?}; routing defaults to list order |
subject | string | Yes | — | Envelope subject, ≤ 100 chars (DocuSign cap) |
message | string | No | — | — |
send | boolean | No | False | false (default) creates a draft; true sends immediately |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | Authenticated organization UUID injected by the workflow boundary |
connection_uuid | uuid | Yes | — | Organization-scoped DocuSign CloudConnection UUID |
workflow_run_id | string | No | — | Engine-stamped parent DAG run id |
documents | list | Yes | — | 1–10 documents as {name, url, file_extension?}; url is an HTTPS presigned GET (vaulted — never persisted in plain) |
recipients | list | Yes | — | 1–50 signers as {email, name, routing_order?}; routing defaults to list order |
subject | string | Yes | — | Envelope subject, ≤ 100 chars (DocuSign cap) |
message | string | No | — | — |
send | boolean | No | False | false (default) creates a draft; true sends immediately |
envelope_ref | string | No | — | — |
envelope_status | string | No | — | — |
document_count | integer | No | — | — |
recipient_count | integer | No | — | — |
created_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_at | string | No | — | — |
retryable | boolean | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Fetching documents and creating the envelope |
completed | No | Yes | Yes | — | Envelope created |
failed | No | Yes | No | — | Envelope creation failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
created | SUCCESS | The envelope was created (and sent when requested) | envelope_ref, envelope_status |
failed | FAILURE | Envelope creation failed | failure_reason, failure_type, retryable |
Business Errors
| Code | Message Template |
|---|---|
DOCUSIGN_ORGANIZATION_CONTEXT_INVALID | Authenticated organization context is missing or does not match the workflow input |
DOCUSIGN_CONNECTION_NOT_FOUND | DocuSign connection {connection_uuid} was not found in the authenticated organization |
DOCUSIGN_CONNECTION_WRONG_PROVIDER | Connection {connection_uuid} is not a DocuSign connection |
DOCUSIGN_CONNECTION_SERVICE_UNAVAILABLE | The shared cloud connection service is unavailable |
DOCUSIGN_PROVIDER_CAPABILITY_MISSING | The installed DocuSign provider does not expose the required API operation |
DOCUSIGN_AUTHENTICATION_FAILED | DocuSign refused the request: |
DOCUSIGN_PROVIDER_REQUEST_FAILED | The DocuSign API request failed: |
DOCUSIGN_RESPONSE_SHAPE_INVALID | The DocuSign API returned an unexpected shape: |
DOCUSIGN_PAGINATION_INVALID | page must be >= 1 and limit between 1 and |
DOCUSIGN_ENVELOPE_NOT_FOUND | No envelope {envelope_ref} is visible in this DocuSign account |
DOCUSIGN_DOCUMENT_TOO_LARGE | The document exceeds the {max_bytes}-byte envelope cap |
DOCUSIGN_DOCUMENT_FETCH_FAILED | Could not fetch the document from its source URL: |
DOCUSIGN_UPLOAD_FAILED | The presigned destination refused the document: |
DOCUSIGN_ENVELOPE_STATE_INVALID | DocuSign refused the envelope operation: |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "docusign.create-envelope",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"documents": "value",
"recipients": "value"
}
}