3.7 KiB
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
- Authenticates with Adobe Sign via OAuth (one-time browser flow, tokens saved to
.env) - Downloads all visible library templates — PDF, metadata, and form field definitions
- Converts each template to a DocuSign
envelopeTemplateJSON, mapping all field types, coordinates, and recipient roles - Uploads the converted template to DocuSign
Prerequisites
- Python 3.10+
- Node.js 18+ (for the DocuSign upload CLI — uses the
esign-directpackage) - 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