SpotDraft integration
Connect SpotDraft with API credentials, import contracts in bulk or selectively, and optionally enable webhooks to import fully executed contracts automatically.
Contracts.ai can import contract PDFs from SpotDraft, run AI analysis on them, and optionally receive new fully executed contracts via webhook.
Open Admin → Integrations tab → SpotDraft to configure the connection.
Safe to connect first: Connecting verifies your API credentials and builds a local search index. It does not bulk-import contracts until you click Import contracts or Import selected.
Prerequisites
- A SpotDraft account with permission to create API credentials (Developer Settings)
- A Contracts.ai organization administrator
- Network access from Contracts.ai to your SpotDraft regional API endpoint
How to connect
Step 1 — Create API credentials in SpotDraft
- Log in to SpotDraft.
- Go to Settings → Developer Settings.
- Click Generate API Credential and give it a name (e.g.
Contracts.ai). - Copy the Client ID and Client Secret.
- The secret is shown only once in SpotDraft — store it securely before leaving the page.
Step 2 — Connect in Contracts.ai
- Open Admin → Integrations → SpotDraft.
- Enter:
- Client ID (required)
- Client Secret (required)
- User Email (optional) — if provided, API calls are made on behalf of this SpotDraft user
- Region (required) — must match your SpotDraft instance:
| Region option | API host |
|---|---|
| Default (India) | api.in.spotdraft.com |
| India | api.in.spotdraft.com |
| United States | api.us.spotdraft.com |
| European Union | api.eu.spotdraft.com |
| Middle East | api.me.spotdraft.com |
- Click Connect SpotDraft.
Contracts.ai verifies the credentials against the SpotDraft API. On success you’ll see SpotDraft connected with connection details (user email if set, region).
On first connect, a background index sync starts automatically so contract search can be faster later.
After connecting — import options
The SpotDraft panel has a single connection view (no separate field-mapping tabs). Use the sections below to control what gets imported.
Bulk import
Click Import contracts in the panel footer to start a background bulk import.
Optional filters (set before importing):
| Control | Behavior |
|---|---|
| Import limit | Maximum number of contracts to import (e.g. 500). Leave blank to import all matching contracts. |
| Filter by contract type | Check one or more contract types to limit the import. Leave all unchecked to include every type. |
What happens during bulk import:
- Contracts.ai lists contracts from SpotDraft (paginated).
- Contracts already linked via
spotdraft://<id>are skipped. - For each new contract, the PDF is downloaded from SpotDraft.
- Duplicate files (same hash) may be skipped.
- New contracts are staged and queued for AI analysis.
Imports run asynchronously. Contracts appear in your list after processing completes (often a few minutes; large imports take longer).
Note: Bulk import attempts to download PDFs for listed contracts. Contracts without a downloadable file are skipped. Webhook import (below) only handles fully executed contracts.
Browse & import specific contracts
Use Browse contracts to cherry-pick individual contracts:
- Open the browse dialog (initial load may list contracts when the search box is empty).
- Search by contract name, type, or ID.
- Paste multiple IDs — one per line or comma-separated — to look up specific contracts.
- Select checkboxes for the contracts you want.
- Click Import selected.
Search index (faster browsing)
The browse dialog shows index status:
| Status | Meaning |
|---|---|
| Index not built | Search queries SpotDraft live (slow for large repositories). |
| Indexing… | Background sync in progress. |
| N contracts indexed | Local index ready; search is fast. |
- Click Build Index to start indexing.
- Click Re-sync to refresh the index after large changes in SpotDraft.
- Index sync also starts automatically when you first connect.
Automatic sync (webhook)
Enable webhooks to import contracts automatically when they are fully executed (signed) in SpotDraft.
- In the Automatic sync (webhook) section, click Enable automatic sync.
- Contracts.ai registers a webhook with SpotDraft for the
CONTRACT_EXECUTEDevent. - When active, the panel shows Active and displays the webhook URL.
Webhook behavior:
- SpotDraft calls Contracts.ai when a contract is executed.
- Contracts.ai downloads the contract PDF and queues it for analysis.
- Contracts already imported (same SpotDraft contract ID) are skipped.
- Payloads are verified with HMAC-SHA512 when SpotDraft provides an HMAC key.
To disable automatic import, click Remove webhook.
Webhook import is execution-only. Bulk and selective import can include contracts in other states if a PDF is available.
What users see after import
Imported contracts are linked to SpotDraft via:
- Source unique ID:
spotdraft://<contract_id> - Source URL:
https://app.spotdraft.com/contracts/<contract_id>
They appear in the main contracts list like any other imported contract and go through standard AI analysis (metadata extraction, risks, obligations, etc.).
There is currently no admin UI to map SpotDraft fields to Contracts.ai fields, and no push sync back to SpotDraft from the contract page.
Disconnecting
Click Disconnect in the panel footer to remove the SpotDraft connection from Contracts.ai.
- Already-imported contracts remain in Contracts.ai.
- Stored API credentials are removed.
- If a webhook was configured, remove it in the UI before disconnecting if you want to stop SpotDraft callbacks cleanly.
Typical workflows
Test with a small batch
- Connect SpotDraft.
- Set Import limit to
10(or use Browse contracts and import a few). - Click Import contracts and confirm contracts analyze correctly.
- Enable Automatic sync for ongoing executed contracts.
Large repository
- Connect and wait for (or manually run) Build Index.
- Use Browse contracts with search or pasted IDs for targeted imports, or
- Use bulk import with contract type filters to narrow scope.
Ongoing executed-contract intake
- Connect SpotDraft.
- Enable Automatic sync (webhook).
- New fully executed contracts in SpotDraft flow into Contracts.ai without manual import.
Troubleshooting
| Issue | What to check |
|---|---|
| Connect fails (401) | Client ID and Client Secret; credential not revoked in SpotDraft |
| Connect fails (403) | API credential lacks permission to list contracts |
| Wrong region | Region must match your SpotDraft tenant (US vs EU vs India, etc.) |
| No contract types in filter | Connection valid but SpotDraft returned no types; try import without filter |
| Import started, nothing appears | Background job still running; check Celery/worker logs for org |
| Contract skipped in bulk import | Already imported (spotdraft:// match) or PDF download unavailable |
| Slow browse/search | Build or re-sync the local index |
| Webhook not importing | Webhook shows Active; contract reached executed state; contract not already imported |
| Duplicate skipped on webhook | Same SpotDraft contract ID already exists in Contracts.ai |
Related settings
- Organization Settings — e.g. import-only-fully-executed and analysis language (apply to all imports, not SpotDraft-specific).
- Custom Fields — store org-specific metadata on imported contracts (populated by AI, not SpotDraft field mapping).
- Roles & Permissions — control who can view and edit imported contracts after intake.
Summary
SpotDraft integration is a straight path: connect with API credentials, import contracts in bulk or by selection, optionally index your repository for fast search, and enable webhooks to automatically pull fully executed contracts into Contracts.ai for analysis.
Did this answer your question?