# DocuSign

> Send documents for signature, track envelope status, and manage templates in DocuSign.

App · E-Signatures · 6 actions. Web page: https://docs.lodol.com/docs/integrations/docusign

## Actions

### Create draft envelope

Prepare a draft envelope with your documents and signers. The draft is not sent yet; use 'Send envelope' when it is ready.

**Inputs**

- Email subject (`email_subject`, text, required): The subject line signers see in the email asking them to sign (up to 100 characters).
- Documents (`documents`, list, required): The documents to be signed. Each document needs its file contents as Base64 text, a name, and an ID you choose (for example "1"). Anything that is not a PDF also needs its file extension.
- Recipients (`recipients`, object, required): Who should receive the envelope. Put the people who must sign under 'signers', each with a name, email, and a unique recipient ID you choose (for example "1").

**Outputs**

- `envelope_id` (text): ID of the new draft envelope.

**Example output**

```json
{
  "envelope_id": "abc123-def456-ghi789"
}
```

### Get envelope status

Check where an envelope is in the signing process (for example sent, delivered, or completed).

**Inputs**

- Envelope ID (`envelope_id`, text, required): The ID of the envelope to check.

**Outputs**

- `status` (text): The current status of the envelope.

**Example output**

```json
{
  "status": "completed"
}
```

### List envelopes

List the documents you have sent for signature (DocuSign calls these envelopes), newest first. You can narrow the list by status or by when the envelope last changed.

**Inputs**

- Status (`status`, text): Only show envelopes with this status. Leave blank to include every status. One of: `sent` (Sent (waiting to be signed)), `delivered` (Delivered (opened)), `signed`, `completed` (Completed (fully signed)), `declined`, `voided` (Voided (cancelled)), `timedout` (Timed out (expired)), `processing`, `created` (Draft).
- Start date (`from_date`, text): Only show envelopes whose status changed on or after this date. Leave blank to look back over the last 90 days.
- Maximum results (`count`, number): The maximum number of envelopes to return (up to 1000).

**Outputs**

- `envelopes` (list): The matching envelopes.

**Example output**

```json
{
  "envelopes": [
    {
      "emailSubject": "Please sign this document",
      "envelopeId": "abc123-def456-ghi789",
      "status": "sent"
    }
  ]
}
```

### List templates

List the reusable envelope templates in your DocuSign account, optionally filtered by name.

**Inputs**

- Search text (`search_text`, text): Only show templates whose name contains this text (up to 48 characters). Leave blank to list all templates.

**Outputs**

- `templates` (list): The matching templates.

**Example output**

```json
{
  "templates": [
    {
      "description": "Standard Non-Disclosure Agreement",
      "name": "NDA Template",
      "templateId": "tmpl-abc123"
    }
  ]
}
```

### Send envelope

Send a draft envelope to its recipients for signature.

**Inputs**

- Envelope ID (`envelope_id`, text, required): The ID of the draft envelope to send.

**Outputs**

- `status` (text): The envelope status ("sent") after sending.

**Example output**

```json
{
  "status": "sent"
}
```

### Void envelope

Cancel an envelope that has already been sent so it can no longer be signed. You must give a reason. Only envelopes that are still in progress can be cancelled, not drafts, and not envelopes everyone has already signed.

**Inputs**

- Envelope ID (`envelope_id`, text, required): The ID of the envelope to cancel.
- Reason (`void_reason`, text, required): Why the envelope is being cancelled (shown to recipients, up to 200 characters).

**Outputs**

- `status` (text): The envelope status ("voided") after cancelling.

**Example output**

```json
{
  "status": "voided"
}
```
