Install
openclaw skills install esign-automationAutomate contract signing, esign, and signature workflows by calling the eSignGlobal CLI tool. The eSignGlobal CLI is agent-friendly, with JSON output by default, making eSignGlobal signing operations easy to parse and chain. Supports creating draft envelopes, obtaining sender view URLs, sending envelopes, querying envelope details, sending reminders, cancelling envelopes, downloading signed files, verifying PDF signatures locally, rendering templates to generate documents for signing, comparing two PDF contracts side by side, managing envelope attachments, managing CC (carbon copy) recipients, and adding or removing signers from draft envelopes.
openclaw skills install esign-automationThis skill provides automation capabilities for the eSignGlobal electronic signature platform. It enables AI agents to automate document signing workflows and integrate with eSignGlobal APIs. This skill is maintained by the eSignGlobal team and is intended for safe automation of contract signing workflows.
Use this skill when the user wants to:
Example requests:
Use the external CLI through npx:
npx @esignglobal/envelope-cli <command>
Before calling any send action, set ESIGNGLOBAL_APIKEY in the shell environment.
If the user does not already have an api key, direct them to:
https://www.esignglobal.com?source=agentSettings -> Integration -> Apps# Windows PowerShell
$env:ESIGNGLOBAL_APIKEY="your_api_key"
# macOS / Linux
export ESIGNGLOBAL_APIKEY="your_api_key"
# Verify connectivity
npx @esignglobal/envelope-cli config health
Credential handling rules:
ESIGNGLOBAL_APIKEYUse the external command-line tool instead of bundled scripts:
npx @esignglobal/envelope-cli create-envelope --subject <subject> [--remark <remark>] [--expire <seconds>] [--redirect-url <url>] [--callback-url <url>]
npx @esignglobal/envelope-cli sender-view --envelope-id <envelopeId> --return-url <url> [--starting-page <page>] [--submit-action <action>] [--no-back-button] [--lock <document|signerInfo>]
npx @esignglobal/envelope-cli send-envelope --file <filePath> --signers '<signersJson>' [--subject <subject>] --confirm
npx @esignglobal/envelope-cli send-envelope --file-key <fileKey> --signers '<signersJson>' [--subject <subject>] --confirm
npx @esignglobal/envelope-cli get-template --template-id <templateId>
npx @esignglobal/envelope-cli render-template --template-id <templateId> [--file-name <name>] [--fields '<fieldsJson>'] [--callback-url <url>]
npx @esignglobal/envelope-cli get-render-result --task-id <taskId>
npx @esignglobal/envelope-cli get-envelope --envelope-id <envelopeId>
npx @esignglobal/envelope-cli urge-envelope --envelope-id <envelopeId>
npx @esignglobal/envelope-cli cancel-envelope --envelope-id <envelopeId> --reason <reason> --confirm
npx @esignglobal/envelope-cli download-envelope --envelope-id <envelopeId> --type list
npx @esignglobal/envelope-cli verify-signature --file <filePath>
npx @esignglobal/envelope-cli contract-compare (--standard-file <filePath> | --standard-file-key <key>) (--comparative-file <filePath> | --comparative-file-key <key>) [--filter-header-footer] [--filter-symbols <sym1,sym2,...>]
npx @esignglobal/envelope-cli add-attachments --envelope-id <envelopeId> --file-keys '<fileKeysJson>'
npx @esignglobal/envelope-cli delete-attachments --envelope-id <envelopeId> --file-keys '<fileKeysJson>' --confirm
npx @esignglobal/envelope-cli add-cc --envelope-id <envelopeId> --cc-infos '[{"userEmail":"...","userName":"..."}]'
npx @esignglobal/envelope-cli delete-cc --envelope-id <envelopeId> --cc-infos '[{"userEmail":"..."}]' --confirm
npx @esignglobal/envelope-cli add-signers --envelope-id <envelopeId> --signers '[{"userName":"...","userEmail":"...","signOrder":1}]'
npx @esignglobal/envelope-cli delete-signers --envelope-id <envelopeId> --signers '[{"userEmail":"..."}]' --confirm
Check available commands if needed:
npx @esignglobal/envelope-cli help
npx @esignglobal/envelope-cli create-envelope --subject "Service Agreement" --remark "Please review and send" --expire 604800
# Step 1: create a draft envelope
npx @esignglobal/envelope-cli create-envelope --subject "Offer Letter"
# Step 2: get the interactive sender view URL
npx @esignglobal/envelope-cli sender-view --envelope-id <envelopeId> --return-url "https://app.example.com/done"
npx @esignglobal/envelope-cli send-envelope --file "C:\\docs\\contract.pdf" --signers '[{"userName":"Bob Smith","userEmail":"bob@example.com"}]' --subject "Please sign this contract" --confirm
npx @esignglobal/envelope-cli get-envelope --envelope-id abc123
# Send a reminder to pending signers (rate limit: once per 30 minutes per envelope)
npx @esignglobal/envelope-cli urge-envelope --envelope-id abc123
npx @esignglobal/envelope-cli cancel-envelope --envelope-id abc123 --reason "Signer information was incorrect." --confirm
# List signed files and their individual download URLs (requires envelope to be completed)
npx @esignglobal/envelope-cli download-envelope --envelope-id abc123 --type list
npx @esignglobal/envelope-cli verify-signature --file "/tmp/signed_contract.pdf"
# Add two attachments to a draft envelope
npx @esignglobal/envelope-cli add-attachments \
--envelope-id abc123 \
--file-keys '["fileKey1","fileKey2"]'
# Remove an attachment from a draft envelope
npx @esignglobal/envelope-cli delete-attachments \
--envelope-id abc123 \
--file-keys '["fileKey1"]' \
--confirm
# Add CC recipients to a draft or in-progress envelope
npx @esignglobal/envelope-cli add-cc \
--envelope-id abc123 \
--cc-infos '[{"userEmail":"alice@example.com","userName":"Alice"}]'
# Remove a CC recipient from a draft envelope
npx @esignglobal/envelope-cli delete-cc \
--envelope-id abc123 \
--cc-infos '[{"userEmail":"alice@example.com"}]' \
--confirm
# Add two signers to a draft envelope with sequential signing order
npx @esignglobal/envelope-cli add-signers \
--envelope-id abc123 \
--signers '[{"userName":"Bob Smith","userEmail":"bob@example.com","signOrder":1},{"userName":"Alice Jones","userEmail":"alice@example.com","signOrder":2}]'
# Remove a signer from a draft envelope
npx @esignglobal/envelope-cli delete-signers \
--envelope-id abc123 \
--signers '[{"userEmail":"bob@example.com"}]' \
--confirm
# Compare two local PDF files
npx @esignglobal/envelope-cli contract-compare \
--standard-file "/tmp/contract_v1.pdf" \
--comparative-file "/tmp/contract_v2.pdf"
# Compare using existing file keys
npx @esignglobal/envelope-cli contract-compare \
--standard-file-key "standardFileKey" \
--comparative-file-key "comparativeFileKey"
# Ignore page headers/footers and specific punctuation
npx @esignglobal/envelope-cli contract-compare \
--standard-file "/tmp/contract_v1.pdf" \
--comparative-file "/tmp/contract_v2.pdf" \
--filter-header-footer \
--filter-symbols ".,。、"
# Step 1: inspect the template fields
npx @esignglobal/envelope-cli get-template --template-id <templateId>
# Step 2: render the template with field values
npx @esignglobal/envelope-cli render-template --template-id <templateId> --fields '[{"fieldId":"<fieldId>","fieldValue":"<value>"}]'
# Step 3: poll until taskStatus is Succeeded (2)
npx @esignglobal/envelope-cli get-render-result --task-id <taskId>
# Step 4: send the rendered document for signing using the returned fileKey
npx @esignglobal/envelope-cli send-envelope --file-key <fileKey> --signers '[{"userName":"Bob Smith","userEmail":"bob@example.com"}]' --subject "Please sign this document" --confirm
npxESIGNGLOBAL_APIKEY must already be configured in the shell environmentcreate-envelope to create a draft envelope (status 0)envelopeId — it is needed for sender-view or further configurationenvelopeId (status 0) from the user or a previous create-envelope responsereturn-url from the user (required — the page to redirect to after the sender submits)--starting-page, --submit-action, --no-back-button, or --lock preferencessender-view to retrieve the interactive URLsender-view for envelopes in Draft status (0); other statuses will be rejected by the APItcode token embedded in the URLenvelopeId: draft envelope ID (status 0)returnUrl: valid https/http URL, max 2048 charactersTwo modes are supported — provide exactly one of --file or --file-key:
--file <filePath> — upload and send a local PDF file--file-key <fileKey> — send a file already on the server (e.g. from get-render-result)fileKeysubject--file, confirm the file is a .pdf at an absolute path--confirm.pdf file--file and --file-key are mutually exclusivefilePath (or fileKey): absolute path to an existing local PDF file, or an existing file keysigners: JSON array of signer objectssubject: optional email or envelope subjectEach signer must include:
userNameuserEmailOptional field:
signOrder as an integer >= 1filePath must be an absolute path to an existing local PDF file.
Example:
/tmp/contract.pdf
Each signer must include:
userNameuserEmailOptional field:
signOrder (integer, minimum 1)Single signer example:
[
{
"userName": "Bob Smith",
"userEmail": "bob@example.com"
}
]
Sequential signing example:
[
{
"userName": "Bob Smith",
"userEmail": "bob@example.com",
"signOrder": 1
},
{
"userName": "Alice Jones",
"userEmail": "alice@example.com",
"signOrder": 2
}
]
Parallel signing example:
[
{
"userName": "Bob Smith",
"userEmail": "bob@example.com",
"signOrder": 1
},
{
"userName": "Alice Jones",
"userEmail": "alice@example.com",
"signOrder": 1
}
]
get-template to inspect the template fields (fieldId, fieldName, fieldType, required)render-template with the collected field values — returns a taskIdget-render-result and poll until taskStatus is Succeeded (2) — returns a fileKeysend-envelope --file-key with the fileKey to send the rendered document for signing--file and --file-key are mutually exclusive; use --file-key when a fileKey is already availabletemplateId: template ID provided by the userfields: array of { fieldId, fieldValue } for required fieldssigners: signer list (same format as Send Envelope Workflow)envelopeId from the user or a previous send-envelope responseget-envelope to retrieve full envelope detailsEnvelope status codes: 0=Draft, 1=In Progress, 2=Completed, 3=Expired, 4=Declined, 5=Canceled
Signer status codes: 0=Pending, 1=Signing, 2=Signed
Always present get-envelope results using this exact template:
🔍 Contract Details: [subject]
Current Status: [envelope_status_icon] [envelope_status_label]
Signing Progress:
● [icon] Initiator: [initiator.userName] ([initiator_status_label])
● [icon] Signer N: [userName] ([signer_status_label]) [bottleneck_marker]
● [icon] CC: [ccName] ([cc_status_label])
Envelope status icon and label mapping:
| Code | Icon | Label |
|---|---|---|
| 0 | ⚪ | Draft |
| 1 | ⏳ | Waiting for Others |
| 2 | ✅ | Completed |
| 3 | ❌ | Expired |
| 4 | ❌ | Declined |
| 5 | ❌ | Canceled |
Initiator: always show as ✅ Sent
Signer status icon and label mapping:
| Code | Icon | Label |
|---|---|---|
| 0 | ⚪ | Pending |
| 1 | ⏳ | Signing |
| 2 | ✅ | Signed |
Bottleneck marker: append <- Current Bottleneck to the first signer whose status is 0 (Pending) or 1 (Signing) when the envelope is In Progress.
CC status: always show as ⚪ Pending Sync if envelope is not yet Completed, ✅ Synced if Completed.
Rules:
ccInfos is empty[subject] from the envelope response as the file nameget-envelope output1) before sending a reminderurge-envelope to notify all pending signerscancel-envelope with --confirm — cancellation is irreversibleenvelopeId from a previous send-envelope response or from the user--type list to check envelope status and retrieve individual file download URLsenvelopeStatus is 2 (Completed), share the downloadUrl for each file with the userEnvelope status codes: 0=Draft, 1=Signing, 2=Completed, 3=Expired, 4=Rejected, 5=Voided
File types in the list response:
CONTRACT — the signed documentCERTIFICATE — the signing audit certificateATTACHMENT — any attachmentsCOMBINED — merged PDF (if enabled on the account)Individual file download URLs are valid for 60 minutes. Download can only proceed when the envelope is Completed.
verify-signature — no API key required, verification runs entirely offlineThe command outputs:
integrity — true (unmodified) / false (tampered) / null (unknown)signatureCount — number of signatures foundisValid — true / false / nullsigner — common name from the signing certificatedeclaredTime — signing time (trusted timestamp preferred over local clock), UTC+08:00signatureAlgorithm — e.g. RSA / SHA-256timestampIssuer — TSA certificate issuer, or "Local time" when no trusted timestamp is presentcertificate.serialNumber, certificate.validFrom, certificate.validUntil
verify-signatureworks fully offline and does not requireESIGNGLOBAL_APIKEY.
--filter-header-footer preference and any punctuation to ignore via --filter-symbolscontract-compare — if local paths are provided, the CLI uploads them automatically before comparingcontractCompareUrl to the user so they can open it in a browser to review highlighted differences.pdf files when local files are given--standard-file and --standard-file-key are mutually exclusive; same for the comparative pairstandardFile (or standardFileKey): absolute path to the baseline PDF, or an existing file keycomparativeFile (or comparativeFileKey): absolute path to the PDF to compare against, or an existing file key--filter-header-footer: exclude headers and footers from comparison--filter-symbols: comma-separated punctuation marks to ignore (e.g. ".,。、")Present the result using this exact template:
**Contract Comparison Ready**
Open the link below to view highlighted differences between the two documents:
[contractCompareUrl]
Comparison ID: {contractCompareBizId}
Rules:
contractCompareBizId for referenceenvelopeId (status 0) from the user or a previous create-envelope responsefileKey strings to attach (upload files first via the Upload Documents API if needed)add-attachments with the envelope ID and file keys JSON array0)envelopeId and the fileKey values to remove from the userdelete-attachments with --confirm--confirm before proceedingenvelopeId from the user or a previous create-envelope / send-envelope responseuserEmail and userNameadd-cc — supported for envelopes in Draft (0) or In Progress (1) statususerName must not contain these special characters: / \ : * " < > | ? or emojienvelopeId: envelope ID (Draft or In Progress)ccInfos: JSON array of { userEmail, userName } objectsenvelopeId and the email addresses of CC recipients to remove from the userdelete-cc with --confirm — only supported for envelopes in Draft status (0)0)--confirm before proceedingenvelopeId: draft envelope ID (status 0)ccInfos: JSON array of { userEmail } objects to removeenvelopeId (status 0) from the user or a previous create-envelope responseuserName, userEmail, and signOrderadd-signers — new signers can only be appended after existing ones; inserting before a current or completed signer is rejected by the API0)userName must not contain these special characters: / \ : * " < > | ? or emojienvelopeId: draft envelope ID (status 0)signers: JSON array of { userName, userEmail, signOrder } objectsbusinessId: developer-defined business numberdeliveryMethods: auto (default), none, email, sms, WhatsAppfreeFormSign: true to allow free stamp/signature placementauthModes: noAuth (default), accessCode, sms, emailAuth, etc.envelopeId and the email addresses of signers to remove from the userdelete-signers with --confirm — only supported for envelopes in Draft status (0)0)--confirm before proceedingenvelopeId: draft envelope ID (status 0)signers: JSON array of { userEmail } objects to removeReturn the external CLI result. Do not bundle or implement upload logic inside this skill.
Present each signature using this exact template:
**Signature is VALID**
(or **Signature is INVALID** / **Signature status unknown** )
**Signer:**
{signer}
**Signing Time:**
{declaredTime}
**Signature Time Source:**
{timestampIssuer}
**Signature Algorithm:**
{signatureAlgorithm}
---
**Signer Certificate**
**Serial Number:**
{certificate.serialNumber}
**Valid From:**
{certificate.validFrom}
**Valid Until:**
{certificate.validUntil}
Rules:
isValid === true or isValid === false;`signatureCount > 1signatureCount === 0, output: "No signatures found in this PDF"If you encounter any issues during invocation, visit the official website at https://www.esignglobal.com?source=agent to submit a support ticket.