OpenClaw DocuSign Agreements
Use this skill to automate agreement sending in OpenClaw with NanoPDF block detection and DocuSign envelope creation.
Workflow
1. Confirm Inputs
Collect:
- Agreement PDF path
- Client signer list (
name,email, optionalkeyandrouting_order) - Email subject and optional message
Use references/nano-pdf-signature-schema.md for expected NanoPDF output and references/docusign-envelope-mapping.md for signer/tab rules.
2. Configure Environment
Set required variables:
NANOPDF_BASE_URLNANOPDF_API_KEYDOCUSIGN_BASE_URL(for examplehttps://demo.docusign.net)DOCUSIGN_ACCOUNT_IDDOCUSIGN_ACCESS_TOKEN
Optional:
NANOPDF_DETECT_PATH(default:/v1/signature-blocks)DOCUSIGN_ENVELOPE_SUBJECTDOCUSIGN_ENVELOPE_BODY
3. Detect Blocks + Send Envelope
Run:
python3 scripts/send_agreement.py \
--pdf contracts/nda.pdf \
--signers-json contracts/signers.json \
--output-dir output/openclaw-agreements
Optional flags:
--subjectoverridesDOCUSIGN_ENVELOPE_SUBJECT--messagesets the email blurb--status createdsaves as draft (sentis default)--scale 1.333333converts NanoPDF point coordinates to DocuSign pixel-style positions
The script will:
- Call NanoPDF to find signature blocks
- Map each block to a signer (by
signer_keyfirst, then in signer order) - Create signer tabs in DocuSign at detected coordinates
- Create and optionally send the envelope
- Write audit files in
--output-dir
4. Validate Before Delivery
Check generated files:
nanopdf_blocks.jsondocusign_payload.jsonenvelope_result.json
If signer mapping is ambiguous or a signer has no blocks, stop and ask for explicit mapping before sending.
Safety Rules
- Never guess recipient emails.
- Stop on missing signature blocks unless the user explicitly approves manual fallback.
- Use
--status createdfirst for new templates or high-stakes contracts. - Keep API tokens in environment variables only.
References
references/nano-pdf-signature-schema.mdreferences/docusign-envelope-mapping.md