docusign.download-documents
Stream a DocuSign envelope artifact (combined PDF or certificate of completion) into a presigned upload URL — bytes never enter workflow state
Stream an envelope's combined PDF or certificate into a presigned PUT URL.
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 |
envelope_ref | string | Yes | — | — |
artifact | string | Yes | — | combined (all documents, one PDF) or certificate (of completion) |
upload_url | string | Yes | — | HTTPS presigned PUT destination (vaulted — never persisted in plain) |
content_type | string | No | — | Must match what the presign was issued for; default application/pdf |
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 |
envelope_ref | string | Yes | — | — |
artifact | string | Yes | — | combined (all documents, one PDF) or certificate (of completion) |
upload_url | string | Yes | — | HTTPS presigned PUT destination (vaulted — never persisted in plain) |
content_type | string | No | — | Must match what the presign was issued for; default application/pdf |
bytes_written | integer | No | — | — |
downloaded_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 | Streaming the artifact to its destination |
completed | No | Yes | Yes | — | Artifact delivered |
failed | No | Yes | No | — | Artifact download failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
delivered | SUCCESS | The artifact reached its destination | bytes_written, artifact |
failed | FAILURE | Artifact download 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.download-documents",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"envelope_ref": "value",
"artifact": "value"
}
}