A contract lands in your inbox on Friday afternoon. By Monday morning, in-house counsel has flagged three potential issues. By Wednesday, legal's found another one that slipped through. By Friday, you're still negotiating with the other party because nobody quite agrees on what clause 4.2 actually means under regional law. Two weeks later, the deal closes, but you're not confident you caught everything. This cycle repeats across dozens of agreements per year. Each one chews through billable hours, introduces human error, and creates blind spots where high-risk language hides in plain sight. The real problem isn't that your team isn't thorough; it's that contract review at scale requires reading, summarising, cross-referencing, and synthesising information faster than any person can reasonably do it. What if you could ingest a contract, flag every material risk, generate a compliance checklist tailored to your jurisdiction, and produce an executive summary before the document even reaches your desk? The workflow below chains together Chat With PDF, Explainpaper, Okara AI, and Smmry with n8n orchestration to build an end-to-end contract analysis engine. You upload a PDF, and a series of automated steps extracts obligations, identifies risky clauses, checks them against your regulatory requirements, and outputs three documents: a risk register, a compliance checklist, and a plain-English summary.
The Automated Workflow
Use n8n for this workflow. It's the best orchestrator for multi-step document processing because it handles file storage natively, supports conditional logic for different contract types, and doesn't require you to write complex authentication code.
Step 1: Ingest the contract and store it centrally
When a contract PDF lands in a shared folder (or via email webhook), n8n captures it and stores the file reference. Use a folder trigger or email trigger to kick off the workflow.
Trigger: File drop in folder or email with attachment
Action: Store file path and filename in n8n context
Output: File object with URL and metadata
Step 2: Generate an initial summary with Smmry
Before diving into detailed analysis, compress the contract into key points using Smmry's API. This acts as a triage step; if the summary reveals this is a simple NDA you've already reviewed dozens of times, you can skip expensive downstream processing.
POST https://api.smmry.com/SM_API
Content-Type: application/x-www-form-urlencoded sm_api_key=YOUR_API_KEY
sm_url=https://your-storage-url/contract.pdf
sm_length=10
Smmry will return the top 10 sentences summarising the document. Store this output.
Step 3: Feed the contract into Chat With PDF for clause extraction
Chat With PDF lets you ask targeted questions of a PDF document. Use n8n's HTTP node to send a series of prompts, each designed to extract specific contractual elements. You'll need a Chat With PDF API key or to use their HTTP interface. For this step, construct three separate queries: 1. "What are all payment terms, timelines, and financial obligations mentioned in this document?" 2. "List every termination clause, exit right, and condition under which either party can end this agreement." 3. "What liabilities, indemnities, warranties, and disclaimers does this document contain?"
POST https://api.chatpdf.com/v1/chats/message
Authorization: Bearer YOUR_CHATPDF_API_KEY
Content-Type: application/json { "conversationId": "conv_abc123", "sourceId": "src_document_xyz", "messages": [ { "role": "user", "content": "What are all payment terms, timelines, and financial obligations mentioned in this document?" } ]
}
Repeat for the other two prompts in separate HTTP nodes, chaining them sequentially within n8n. Extract and store each response.
Step 4: Use Okara AI to draft risk annotations
Okara AI is where you inject domain expertise without manual work. Use it to draft risk-flagging comments on the clauses Chat With PDF extracted. Feed Okara the extracted clauses and ask it to produce a risk rating (high, medium, low) with justifications. Since Okara emphasises encrypted, sensitive work, use it here for internal legal analysis. Send the clauses via their API or chat interface.
POST https://api.okara.ai/v1/analyse
Authorization: Bearer YOUR_OKARA_KEY
Content-Type: application/json { "documentType": "contract", "content": "Payment clause extracted from Chat With PDF response", "analysisType": "risk_assessment", "jurisdiction": "UK"
}
The response will include risk flags, suggested edits, and regulatory concerns.
Step 5: Cross-reference with your compliance checklist using Claude
Now use Claude Opus 4.6 to synthesise everything. Send it the original contract summary, the extracted clauses, and the risk annotations from Okara. Ask it to generate two outputs: a compliance checklist (formatted as a CSV or JSON) and a final risk summary. Use n8n's native Claude integration (via Anthropic's API):
POST https://api.anthropic.com/v1/messages
Authorization: x-api-key YOUR_ANTHROPIC_KEY
Content-Type: application/json { "model": "claude-opus-4.6", "max_tokens": 2048, "messages": [ { "role": "user", "content": "You are a contract risk analyst. I have extracted the following clauses and risk flags from a contract:\n\n[Payment terms from Chat With PDF]\n\n[Risk annotations from Okara AI]\n\nGenerate a JSON compliance checklist with keys: item_id, requirement, status (compliant/non_compliant/unclear), severity (high/medium/low), and remediation_note. Then provide a 3-paragraph executive risk summary." } ]
}
Claude will structure the checklist and summary for you automatically.
Step 6: Store outputs and notify stakeholders
Write the three outputs (summary, checklist, risk summary) to a shared drive or Google Docs folder. Trigger a Slack notification or email to in-house counsel with links to each document.
Action: Write file to /contracts/reviewed/[contract-name]-checklist.json
Action: Write file to /contracts/reviewed/[contract-name]-risk-summary.md
Action: Send Slack message to #legal-ops with links
Complete n8n workflow diagram (conceptual):
File arrives → Smmry (summarise) → Chat With PDF (extract clauses) → Okara AI (risk flag) → Claude Opus 4.6 (synthesise and format) → Write outputs → Slack notification. The entire workflow should complete in 2-3 minutes per contract, depending on length and API response times.
The Manual Alternative
If you prefer granular control over each step, you can run this workflow partially manually: 1. Upload the contract to Chat With PDF directly (no automation) and ask it the three extraction questions yourself.
-
Copy the responses into Okara AI's web interface and request risk annotations.
-
Paste everything into Claude's web interface (Claude.ai) and ask for the checklist and summary.
-
Download the outputs and file them. This takes 15-20 minutes per contract but gives you the option to refine prompts, ask follow-up questions, and sense-check the AI's work before it leaves your hands. It's useful for high-value or unusual contracts where the stakes justify the extra time.
Pro Tips
Rate limiting and cost:
Smmry has a 10-request-per-minute limit on their free tier. If you're processing more than one contract every six seconds, add a delay node in n8n between Smmry calls. Their paid plan removes this restriction and costs around £15 per month.
Handling multi-language contracts:
Chat With PDF and Claude both handle non-English documents well, but Smmry performs best on English text. If you receive contracts in other languages, skip Smmry or translate first using Claude's native language support.
Validate Claude's checklist format:
Claude sometimes returns JSON that's almost valid but missing commas or has stray characters. Add a validation node in n8n after the Claude step that attempts to parse the JSON and re-prompts Claude if parsing fails.
Use Explainpaper for unusual or archaic language:
If Chat With PDF highlights a clause in jargon or older legal language, feed that clause text to Explainpaper's API for a plain-English breakdown. This is optional but useful for contracts written in legacy formats.
Reuse extracted data across workflows:
Store the Chat With PDF extractions in a database (n8n supports PostgreSQL, MongoDB, etc.) so you can later search across all reviewed contracts. Over time, you'll build a searchable archive of every clause type your organisation has encountered.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| Chat With PDF | Pro or API access | £10–50 | Depends on document volume; 50 PDFs/month on starter tier |
| Smmry | Free tier sufficient; Unlimited at £15 | £0–15 | Free tier is 10 requests/minute; upgrade if processing >5 contracts/day |
| Okara AI | Standard (encrypted workspace) | £25–75 | Billed per user; good for 2–3 in-house counsel |
| n8n | Self-hosted (free) or Cloud Pro | £0–30 | Self-hosted requires server; Cloud Pro at £30/month includes 10k executions |
| Anthropic (Claude Opus 4.6) | Pay-as-you-go | £5–20 | ~£0.015 per 1k input tokens, £0.06 per 1k output tokens; ~2k tokens per contract analysis |
| Total | , | £40–190 | Varies by contract volume and whether you self-host n8n |