Back to Alchemy
Alchemy RecipeIntermediateautomation

Legal brief generation and client cost estimate from case documents

28 March 2026

Introduction Legal firms lose money every single day to administrative overhead.

A partner reviews a case file, pulls key facts, estimates client costs, and writes a brief summary. All of this takes hours. A junior associate repeats similar work the next morning because nothing was automated. By Friday, both have spent 15 hours on tasks that a properly configured workflow could handle in minutes. The problem compounds when files are scattered across email, cloud storage, and case management systems. Document review becomes a manual copy-paste exercise. Cost estimation happens in spreadsheets that go out of date. Client summaries end up being generic boilerplate because there is no time to customise them properly. This workflow solves that. You feed in case documents, PDFs, statements, evidence files, whatever format they arrive in. The system extracts relevant information, summarises the material, estimates client costs, and outputs a polished brief ready for client delivery or internal review. No manual handoff. No switching between applications.

The Automated Workflow Start with the orchestration tool. For this workflow, n8n is the right choice.

Zapier would work, but n8n gives you more fine-grained control over data transformation and error handling, which matters when you are working with legal documents. Make (Integromat) is also viable if your team already uses it, but n8n's conditional logic and custom code nodes make it simpler to route different document types correctly. The workflow has five stages: trigger, summarise, estimate, draft, and deliver. Stage one is the trigger. You can start this three ways: upload a file to a shared folder that n8n monitors, send a document via email to a webhook address, or manually kick off the workflow from n8n's interface. For law firms, folder monitoring tends to work best because staff already drop files into designated folders.

Trigger: Monitor folder for new files
n8n watches: /case-documents/pending
File types: .pdf, .docx
Action: Extract file content when new file appears

Stage two extracts and summarises the document. This is where Chat With PDF by Copilot.us comes in. You send the document to their API along with a customised prompt. The prompt asks the model to extract case name, parties involved, key dates, claims, evidence summary, and liability assessment. Chat With PDF will pass this to an underlying language model, Claude Opus 4.6 or GPT-4o depending on your configuration, and return structured text.

POST https://api.copilot.us/v1/pdf/analyse
Content-Type: application/json { "file_url": "s3://your-bucket/case-001.pdf", "prompt": "Extract the following in JSON format: case_name, parties, key_dates, claims_summary, evidence_points, liability_assessment. Be concise and fact-based.", "model": "claude-opus-4.6"
}

The response comes back as structured JSON. n8n parses this and stores the key fields as workflow variables. Stage three creates a cost estimate. You pass the extracted case data to Estimatic AI. Estimatic expects work scope, complexity, and risk factors. Map your extracted data to these fields: - Scope: number of parties, document count, hearing date proximity

  • Complexity: liability assessment, number of evidence points, case type
  • Risk factors: appeals likelihood, regulatory involvement, discovery scope
POST https://api.estimatic.ai/v1/estimates
Content-Type: application/json { "project_name": "{{case_name}}", "scope_description": "{{claims_summary}}", "complexity_level": "{{liability_assessment_to_level}}", "hours_estimate": 40, "rate_per_hour": 250, "risk_multiplier": 1.2
}

Estimatic returns a cost breakdown: labour hours, materials, contingency, and total client estimate. Store this as another set of workflow variables. Stage four drafts the brief. This is where Okara AI comes in. Okara is designed for sensitive work; it uses encrypted multi-model chat, so your case documents never sit unencrypted in logs. You compile the summary, estimate, and extracted case facts into a structured prompt and send it to Okara:

POST https://api.okara.ai/v1/draft
Authorization: Bearer YOUR_OKARA_TOKEN
Content-Type: application/json { "document_type": "client_brief", "content": { "case_name": "{{case_name}}", "summary": "{{case_summary}}", "parties": "{{parties}}", "key_dates": "{{key_dates}}", "estimate": "{{total_estimate}}", "hours": "{{estimated_hours}}" }, "instructions": "Draft a professional client brief. Include case overview, key timeline, liability summary, and fee estimate. Use plain language. Format for PDF delivery.", "model": "claude-sonnet-4.6", "encrypt": true
}

Okara drafts the brief and returns it. The encryption means it is safe to store the output. Stage five delivers the output. n8n has several options here. You can email the brief to the case partner, save it to a shared drive with a specific folder structure, or push it to your case management system via API. Most firms prefer email plus cloud storage backup:

n8n Email Node:
To: {{partner_email}}
Subject: Client Brief and Estimate: {{case_name}}
Body: Brief attached. Estimated cost: £{{total_estimate}}. Review and confirm with client.
Attachment: {{okara_brief_output}} n8n Google Drive Node:
Folder: /Case Briefs/{{year}}/{{case_name}}/
File: brief_{{date}}.pdf
Content: {{okara_brief_output}}

Tying it together in n8n: Create a workflow with these nodes in sequence: 1. File trigger (watch folder) 2. Read file content 3. HTTP Request node: send to Chat With PDF 4. Set Variables: parse JSON response 5. HTTP Request node: send extracted data to Estimatic AI 6. Set Variables: parse cost estimate 7. HTTP Request node: send everything to Okara AI for drafting 8. Email node: send brief to partner 9. Google Drive node: save brief to archive Add conditional branches after the HTTP requests to catch errors. If Chat With PDF returns an error code, log it and send an alert email to the admin. If Estimatic fails because it cannot parse the scope, retry with a simplified prompt. The entire workflow runs synchronously, so the brief is ready within two to three minutes of upload.

The Manual Alternative If you want more control over each stage, do not use full automation.

Instead, build a semi-automated workflow: 1. Use Chat With PDF to summarise documents, but review the output before proceeding.

  1. Copy the extracted facts into Estimatic manually, allowing the partner to adjust complexity and risk multipliers.

  2. Review the estimate, modify if needed, then feed it to Okara for drafting.

  3. Edit the Okara draft in Google Docs before sending to the client. This takes longer but lets you catch mistakes and add legal nuance that the models might miss. Use n8n to orchestrate the steps, but pause at checkpoints for human review.

Pro Tips Prompt customisation matters. The Chat With PDF prompt should ask for exactly what you need.

Instead of "summarise the document," ask: "Extract liability admissions, causation evidence, and damages calculations. Ignore procedural information." This reduces noise and makes downstream steps faster. Rate limiting is real. Chat With PDF, Okara, and Estimatic all have API rate limits. If you upload ten documents at once, you will hit limits. Add delays between requests in n8n, or use a queue system. Build in exponential backoff for retries: wait 2 seconds, then 4 seconds, then 8 seconds before trying again. Test with non-sensitive documents first. Upload a publicly available case summary or a practice file before running the workflow on live client work. Okara encrypts content, but you still want to verify data flows correctly and outputs are properly formatted. Cost estimation needs tuning. Estimatic's first estimates may be low or high depending on your firm's billing model. After the first five workflows, review the estimates against your actual hours billed. Adjust the rate per hour and complexity multipliers in your n8n variables to match reality. Archive everything. Save every input document, extracted summary, estimate, and final brief. You will need these for billing reconciliation and audit trails. Use timestamped folder structures so you can find any workflow run six months later.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
n8nCloud Pro£40Covers up to 40 million executions per month. Sufficient for 100+ workflows weekly.
Chat With PDF by Copilot.usPro£25Includes 5,000 API calls per month. Covers 50+ documents weekly.
Estimatic AIStandard£60Includes 500 estimates. Covers client work plus internal projects.
Okara AIProfessional£120Multi-model access with encryption. 10,000 requests per month.
SmmryAPI Plan£30Optional; use only if you need additional summarisation for complex documents.
OpenAI or Anthropic (if using directly)Usage-based£20–80Depends on model calls. Covered partly by Okara and Chat With PDF subscriptions.
Total£275–335Annual cost approximately £3,300–4,020. Typical saving: 20–30 billable hours per partner per month.