Go to file
Paul Huliganga e30e9d4f14 docs: README, platform quirks, validation notes, and sample reference data
README.md — rewritten to reflect actual usage: setup, auth flows, CLI
commands for all three scripts, and links to field-mapping and quirks docs.

tests/PLATFORM-QUIRKS.md — documents confirmed bugs and API quirks found
during development: numberTabs rendering as text+validation (DocuSign API
bug), multi-location field fix, zero-width tab fix, Company/Title contentType
SIGNER_ prefix variant from Adobe Sign API.

tests/ — SCENARIOS, EDGE-CASES, FIELD-TYPE-REGRESSION test planning docs.

validation/ — research notes: field eval, mapping ambiguity log, decision
log, conditional logic analysis, round-trip eval, DocuSign ingest eval.

docs/architecture.md — system architecture overview.
api-samples.md — annotated Adobe Sign API response examples.
PRODUCT-SPEC.md — product requirements and migration scope definition.
sample-templates/ — JSON fixtures (NDA, onboarding, sales contract) for
offline testing; PDFs excluded from version control.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 19:45:46 -04:00
docs docs: README, platform quirks, validation notes, and sample reference data 2026-04-15 19:45:46 -04:00
sample-templates docs: README, platform quirks, validation notes, and sample reference data 2026-04-15 19:45:46 -04:00
src feat: end-to-end migration runner and test template utilities 2026-04-15 19:45:31 -04:00
tests docs: README, platform quirks, validation notes, and sample reference data 2026-04-15 19:45:46 -04:00
validation docs: README, platform quirks, validation notes, and sample reference data 2026-04-15 19:45:46 -04:00
.gitignore chore: exclude generated outputs and binary assets from git 2026-04-15 19:44:26 -04:00
PRODUCT-SPEC.md Initial project scaffold (Cleo) 2026-04-14 19:21:17 -04:00
PROJECT-SETUP.md Initial project scaffold (Cleo) 2026-04-14 19:21:17 -04:00
README.md docs: README, platform quirks, validation notes, and sample reference data 2026-04-15 19:45:46 -04:00
api-samples.md Initial project scaffold (Cleo) 2026-04-14 19:21:17 -04:00
field-mapping.md feat: core migration — Adobe Sign to DocuSign field mapping and composition 2026-04-15 19:45:13 -04:00
requirements.txt feat: DocuSign JWT auth and pure-Python template upload client 2026-04-15 19:45:23 -04:00

README.md

Adobe Sign → DocuSign Migrator

A Python toolkit for migrating library templates from Adobe Sign (Acrobat Sign) to DocuSign. It downloads templates via the Adobe Sign API, converts them to DocuSign format, and uploads them via the DocuSign API.


What it does

  1. Authenticates with Adobe Sign via OAuth (one-time browser flow, tokens saved to .env)
  2. Downloads all visible library templates — PDF, metadata, and form field definitions
  3. Converts each template to a DocuSign envelopeTemplate JSON, mapping all field types, coordinates, and recipient roles
  4. Uploads the converted template to DocuSign

Prerequisites

  • Python 3.10+
  • Node.js 18+ (for the DocuSign upload CLI — uses the esign-direct package)
  • An Adobe Sign OAuth app (EU2 shard) with scopes: library_read:self library_write:self user_read:self
  • A DocuSign developer account with an integration key and RSA keypair

Setup

1. Install Python dependencies:

pip install -r requirements.txt

2. Create a .env file in the project root (never commit this):

ADOBE_CLIENT_ID=your-adobe-client-id
ADOBE_CLIENT_SECRET=your-adobe-client-secret
ADOBE_REDIRECT_URI=https://localhost:8080/callback
ADOBE_BASE_URL=https://api.eu2.adobesign.com/api/rest/v6/

DOCUSIGN_ACCOUNT_ID=your-docusign-account-id
DOCUSIGN_INTEGRATION_KEY=your-integration-key
DOCUSIGN_BASE_URL=https://demo.docusign.net/restapi
DOCUSIGN_PRIVATE_KEY_PATH=/path/to/private.key
DOCUSIGN_USER_ID=your-docusign-user-id

3. Authenticate with Adobe Sign (one-time):

python3 src/auth_adobe.py

This opens a browser. After authorizing, paste the redirect URL back into the terminal. Tokens are saved to .env and auto-refreshed on subsequent runs.


Running a migration

Download all templates from Adobe Sign:

python3 src/download_templates.py

Downloads to downloads/<template-name>__<id>/ — one folder per template containing metadata.json, form_fields.json, documents.json, and the PDF.

Convert a downloaded template to DocuSign format:

python3 src/compose_docusign_template.py

Writes DocuSign template JSONs to migration-output/<template-name>/docusign-template.json.

Upload to DocuSign:

node packages/esign-direct/build/cli.js templates create --file migration-output/<name>/docusign-template.json

Or run the full pipeline end-to-end for a specific template:

python3 src/migrate_paul_template.py

(Edit the TEMPLATE_NAME constant at the top of the script to target a different template. If multiple templates share the same name, the most recently modified one is used.)


Field type mapping

See field-mapping.md for the full Adobe Sign → DocuSign tab type table, including edge cases and known gaps.

Known API quirks and bugs

See tests/PLATFORM-QUIRKS.md for documented platform bugs, unexpected API behaviors, and the fixes applied.


Project structure

src/
  auth_adobe.py              # One-time OAuth flow for Adobe Sign
  adobe_api.py               # Adobe Sign API client (auto token refresh)
  download_templates.py      # Download all templates from Adobe Sign
  compose_docusign_template.py  # Core conversion logic: Adobe → DocuSign JSON
  migrate_paul_template.py   # End-to-end runner (download → convert → upload)

downloads/                   # Downloaded Adobe Sign templates (gitignored)
migration-output/            # Converted DocuSign template JSONs (gitignored)

field-mapping.md             # Field type mapping table + edge case log
tests/PLATFORM-QUIRKS.md     # Known bugs and API quirks
requirements.txt             # Python dependencies