Automated legal document review and client summary generation
- Published
Legal professionals spend countless hours reviewing documents that follow predictable patterns. A contract arrives in your inbox, you read through it, highlight key sections, then write a summary for the client. The next day, another contract arrives. And another. The work is necessary but repetitive, and it delays your ability to focus on actual legal strategy....... For more on this, see Legal contract review and client summary document generation. For more on this, see Legal document analysis and contract summarisation.
The bottleneck is manual: document review, then manual summary creation, then client communication. Each handoff introduces delay and the possibility of error. What if this entire sequence could run automatically the moment a document lands in your inbox?
This workflow combines three AI tools to handle the job without human intervention. You upload a PDF, and within minutes you get a structured summary ready to send to your client. No copying between windows, no reformatting, no waiting. The automation handles classification, extraction, and polished writing in one continuous chain.
The Automated Workflow
This workflow takes a legal document (PDF) from your inbox or upload folder, extracts key information, summarises it, then generates a professional client summary. The entire process requires zero manual handoff between tools.
How the pieces fit together
The workflow has four distinct steps:
- Document upload and extraction (Chat with PDF by Copilotus)
- Content summarisation (Resoomer AI)
- Polished summary generation (Wordsmith AI)
- Delivery to client email or shared folder
Data flows from step one to step two to step three. Each tool receives structured output from the previous step, processes it, and passes the result forward.
Choosing your orchestration tool
For intermediate users, n8n or Make work well here. Both have native integrations with email services and cloud storage, and both allow conditional logic if you want to handle different document types separately. Zapier is simpler but less flexible for complex data transformation. Claude Code is useful if you need to write custom processing logic between steps.
I'll show n8n examples below, since it offers the best balance of power and maintainability for this workflow.
Step 1: Trigger on document upload
The workflow starts when a document lands in your email inbox or a shared folder. You'll set up a trigger that watches for new PDFs.
If you're using email, your trigger looks like this:
Trigger: Gmail (or your email provider)
Condition: Email has attachment with filetype = "pdf"
Extract: Attachment binary data
Pass to next step: PDF file, sender email, email subject
If you're using cloud storage (Google Drive, Dropbox, OneDrive):
Trigger: Google Drive (or equivalent)
Condition: File created in specific folder AND filetype = "pdf"
Extract: File ID, file name, file path
Pass to next step: File binary data, file metadata
In n8n, this looks like:
Node type: Email Trigger (Gmail)
Configure:
- Service: Gmail
- Trigger on: New attachment
- Filter: attachment.mimeType contains "pdf"
Output: attachment binary, sender email, subject line
Or for cloud storage:
Node type: Google Drive Trigger
Configure:
- Folder ID: [your legal documents folder]
- Event: File created
- File type filter: pdf
Output: file binary, file name, created date
Step 2: Extract text and key information with Chat with PDF
Chat with PDF by Copilotus accepts a PDF and returns extracted text. You'll query it with a prompt designed for legal documents, asking it to identify parties, key dates, obligations, and potential risks.
The API endpoint is:
POST https://api.copilotus.ai/v1/pdf/analyse
Your request payload:
{
"file": "[binary PDF data from trigger]",
"model": "[gpt](/tools/gpt)-4",
"prompt": "Extract the following from this legal document: (1) all parties involved, (2) effective date and termination date, (3) key obligations or deliverables, (4) payment terms if any, (5) liability or indemnification clauses, (6) termination conditions. Format as structured data.",
"format": "json"
}
In n8n, add a node to make this HTTP POST request:
Node type: HTTP Request
Method: POST
URL: https://api.copilotus.ai/v1/pdf/analyse
Authentication: Bearer [your API key]
Headers:
Content-Type: multipart/form-data
Body:
file: [attach binary from trigger]
model: gpt-4
prompt: [extraction prompt above]
format: json
The response returns structured JSON:
{
"parties": ["Company A", "Company B"],
"effective_date": "2024-01-15",
"termination_date": "2025-01-14",
"obligations": [
"Company A to provide monthly reports",
"Company B to pay £5,000 per month"
],
"payment_terms": "Net 30",
"liability_clause": "Neither party liable for indirect damages exceeding contract value",
"termination_conditions": "Either party may terminate with 90 days written notice"
}
Store this JSON output for the next step.
Step 3: Summarise with Resoomer AI
Resoomer AI reads the extracted text and creates a condensed version. This saves Wordsmith AI processing time and cost.
The API endpoint:
POST https://api.resoomer.com/v1/summarize
Your request:
{
"text": "[extracted text from Chat with PDF response]",
"density": 30,
"language": "en"
}
The density parameter controls compression. 30 means the summary is roughly 30% of the original length. For legal documents, set this between 20 and 40 depending on your preferred summary length.
In n8n:
Node type: HTTP Request
Method: POST
URL: https://api.resoomer.com/v1/summarize
Authentication: Bearer [your API key]
Headers:
Content-Type: application/json
Body:
text: [extracted text from step 2]
density: 30
language: en
Resoomer returns:
{
"summary": "Company A and Company B entered into an agreement effective 15 January 2024, terminating 14 January 2025. Company A must deliver monthly reports. Company B pays £5,000 monthly, Net 30 terms. Neither party is liable for indirect damages. Either party may exit with 90 days notice.",
"original_length": 4823,
"summary_length": 412,
"compression_ratio": 0.085
}
Step 4: Generate a polished client summary with Wordsmith AI
Now you have a summary, but it's still raw. Wordsmith AI transforms it into professional client-ready language.
The API endpoint:
POST https://api.wordsmith.ai/v1/generate
Your request combines the Resoomer summary with context:
{
"input": "[Resoomer summary from step 3]",
"tone": "professional",
"style": "business",
"template": "legal_summary",
"instructions": "Rewrite this contract summary for a client who is not a lawyer. Use clear language. Highlight any risks or unusual terms. Structure it with headings: Overview, Key Dates, Financial Terms, Obligations, Risks, Next Steps."
}
In n8n:
Node type: HTTP Request
Method: POST
URL: https://api.wordsmith.ai/v1/generate
Authentication: Bearer [your API key]
Headers:
Content-Type: application/json
Body:
input: [Resoomer summary]
tone: professional
style: business
template: legal_summary
instructions: [instructions above]
Wordsmith returns:
{
"generated_text": "Contract Summary: Agreement between Company A and Company B\n\nOverview\nCompany A and Company B have entered into a service agreement running for one year, from 15 January 2024 to 14 January 2025.\n\nKey Dates\n- Start Date: 15 January 2024\n- End Date: 14 January 2025\n- Notice Period for Termination: 90 days\n\nFinancial Terms\nCompany B will pay Company A £5,000 per month on Net 30 payment terms (payment due within 30 days of invoice).\n\nObligations\nCompany A must deliver monthly reports to Company B.\n\nRisks and Important Terms\nNeither party can be held responsible for indirect damages (such as lost profits) that exceed the total contract value. This is a common limitation but worth noting if significant losses could occur.\n\nNext Steps\nReview this summary with your legal team if you have concerns. The contract can be terminated by either party with 90 days written notice.\n",
"word_count": 187,
"confidence_score": 0.94
}
Step 5: Send to client or save to folder
Your polished summary is ready. Now route it to the client. You have two options:
Option A: Email the summary directly to the client:
Node type: Send Email (Gmail or equivalent)
To: [extract from original email OR hardcode client email]
Subject: Contract Summary: [insert document filename]
Body: [Wordsmith generated_text]
Option B: Save to a shared folder and notify the client:
Node type: Google Drive (or cloud storage equivalent)
Action: Create File
Folder: /Client Summaries/
File Name: [original filename]_summary.txt
Content: [Wordsmith generated_text]
Then add Email node to notify client: "Your contract summary is ready at [shared link]"
Most legal workflows prefer Option A (email) for security and client communication, but Option B works if you use a shared portal.
Complete n8n workflow JSON
Here's a minimal n8n workflow configuration you can import:
{
"nodes": [
{
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"parameters": {
"triggerOn": "newEmail",
"filter": "has:attachment filename:pdf"
}
},
{
"name": "Extract with Chat with PDF",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.copilotus.ai/v1/pdf/analyse",
"headers": {
"Authorization": "Bearer {{ $env.COPILOTUS_API_KEY }}"
},
"bodyType": "json",
"body": {
"prompt": "Extract parties, dates, obligations, payment terms, liability clauses, and termination conditions."
}
}
},
{
"name": "Summarise with Resoomer",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.resoomer.com/v1/summarize",
"headers": {
"Authorization": "Bearer {{ $env.RESOOMER_API_KEY }}"
},
"bodyType": "json",
"body": {
"density": 30,
"language": "en"
}
}
},
{
"name": "Polish with Wordsmith",
"type": "n8n-nodes-base.httpRequest",
"parameters": {
"method": "POST",
"url": "https://api.wordsmith.ai/v1/generate",
"headers": {
"Authorization": "Bearer {{ $env.WORDSMITH_API_KEY }}"
},
"bodyType": "json",
"body": {
"tone": "professional",
"template": "legal_summary"
}
}
},
{
"name": "Send Email to Client",
"type": "n8n-nodes-base.gmail",
"parameters": {
"resource": "message",
"operation": "send",
"to": "{{ $node['Gmail Trigger'].json.from }}",
"subject": "Contract Summary: {{ $node['Gmail Trigger'].json.subject }}",
"textOnly": false,
"body": "{{ $node['Polish with Wordsmith'].json.generated_text }}"
}
}
]
}
The Manual Alternative
If you prefer human oversight at each stage, you can pause the workflow at strategic points.
After step 2 (Chat with PDF extraction), send a Slack notification with the extracted data and wait for manual approval before continuing. In n8n, add a conditional node that pauses until you react to the Slack message.
After step 3 (Resoomer summary), add a human approval step. An email goes to you with the draft summary; only when you approve does it move to step 4.
This hybrid approach trades some automation for control, useful if your documents vary significantly or if certain contract types need lawyer review before client communication.
Pro Tips
Error handling and retries
PDF extraction sometimes fails if the document is scanned (image-based) rather than text-based. Add a retry rule: if Chat with PDF returns an error, try again with OCR enabled.
In n8n, add an error handler node:
Node type: Catch node (attached to Chat with PDF)
On error:
Set variable: ocr_enabled = true
Retry HTTP request with parameter: ocr=true
If still fails: send email to you flagging the document for manual review
Rate limiting
Each service has rate limits. Chat with PDF allows 100 requests per minute on paid plans. Resoomer allows 500 per month on the Standard plan. If you process more than a few documents per day, you'll hit these limits.
Solution: add a delay node between requests.
Node type: Wait
Set wait time: 2 seconds (leaves headroom for 30 requests per minute)
Or upgrade to higher-tier plans if processing volume grows.
Cost optimisation
You're paying for three services. Costs scale with usage, but there's waste if you're processing documents that don't need full treatment.
Add a filter: if the document is under 500 words, skip Resoomer (it's overkill for short documents) and go straight to Wordsmith. If the document is over 20 pages, log a warning because extraction might be incomplete.
Node type: Conditional
If: Chat with PDF response word count < 500
Then: Skip Resoomer, pass directly to Wordsmith
If: Chat with PDF response word count > 5000
Then: Send alert to legal team (document may need manual review)
Handling different document types
Not all legal documents are contracts. Some are NDAs, employment agreements, or lease terms. The extraction prompt in step 2 can be customised per document type.
Add logic to detect the document type (check filename or first page), then use a different extraction prompt:
Node type: Switch
If filename contains "nda": use NDA extraction prompt
If filename contains "employment": use employment agreement prompt
If filename contains "lease": use lease agreement prompt
Default: use general contract prompt
This ensures the extracted data is always relevant to the document type.
Security considerations
You're processing potentially sensitive client documents. Ensure:
- Your n8n instance runs on a private server or uses encrypted n8n Cloud.
- API keys are stored as environment variables, not hardcoded.
- Emails containing summaries use your organisation's email (not a shared mailbox).
- Consider adding a step that watermarks summaries or marks them as confidential.
If documents contain highly sensitive information (trade secrets, personal data), confirm that Copilotus, Resoomer, and Wordsmith meet your data privacy requirements. Some firms use self-hosted alternatives for this reason.
Cost Breakdown
| Tool | Plan Needed | Monthly Cost | Notes |
|---|---|---|---|
| Chat with PDF by Copilotus | Pro (100 docs/month) | £40–£80 | Scales with document volume. Overages are charged per request. |
| Resoomer AI | Standard (500 credits/month) | £30–£50 | One credit per summarisation. Suitable for 20–50 documents monthly. |
| Wordsmith AI | Professional (500 generations/month) | £50–£100 | One generation per polished summary. Suitable for 20–50 outputs monthly. |
| n8n | Self-hosted or Cloud Pro | £0 (self-hosted) or £50 (Cloud) | Self-hosted is free but requires server maintenance. Cloud handles scaling automatically. |
| Email service (Gmail) | Business Standard | £5 (if not already in use) | Often already included in your organisation's email plan. |
| Total | — | £125–£285 | Assumes 20–50 documents monthly. Costs scale with higher volumes. |
For a solo practitioner processing 10 documents per month, expect the lower end. For a mid-size firm processing 100+ monthly, you'll likely need upgraded plans and budget closer to £300–£500 monthly. The time saved justifies the cost; a lawyer processing one document manually takes 30–45 minutes; this workflow takes 2–3 minutes end-to-end.
More Recipes
Automated Podcast Production Workflow
Automated Podcast Production Workflow: From Raw Audio to Published Episode
Build an Automated YouTube Channel with AI
Build an Automated YouTube Channel with AI
Medical device regulatory documentation from technical specifications
Medtech companies spend significant resources translating technical specs into regulatory-compliant documentation.