docusign.create-envelope-from-template
Create a DocuSign envelope from a server template with role assignments — draft by default, sent with send=true
Create a DocuSign envelope (draft or sent) from a server template.
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 |
template_ref | string | Yes | — | Template id from docusign.list-templates |
role_assignments | list | Yes | — | One {role_name, email, name} per template role |
subject | string | No | — | Overrides the template's subject when set |
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 |
template_ref | string | Yes | — | Template id from docusign.list-templates |
role_assignments | list | Yes | — | One {role_name, email, name} per template role |
subject | string | No | — | Overrides the template's subject when set |
send | boolean | No | False | false (default) creates a draft; true sends immediately |
envelope_ref | string | No | — | — |
envelope_status | string | 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 | Creating the envelope from the template |
completed | No | Yes | Yes | — | Envelope created from template |
failed | No | Yes | No | — | Envelope creation from template 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 from the template | 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-from-template",
"initial_data": {
"organization_uuid": "value",
"connection_uuid": "value",
"template_ref": "value",
"role_assignments": "value"
}
}