Back to Alchemy
Alchemy RecipeAdvancedworkflow

Legal contract review and client summary document generation

24 March 2026

Introduction

Contract review is a time sink. Your legal team spends hours reading PDFs, extracting key points, and summarising findings for clients. Each contract requires manual reading, note-taking, and document creation. The inconsistency is real too; summaries vary in depth and quality depending on who wrote them and when they did it.

The problem multiplies when you handle multiple contracts weekly. A mid-sized firm reviewing ten contracts a week is burning roughly forty to fifty hours monthly just on initial analysis and summary generation. That's before any back-and-forth with clients or revisions.

This workflow eliminates that friction. You'll feed contracts straight into an automated pipeline that extracts terms, generates summaries, and produces client-ready documents without anyone touching a keyboard in between. The entire process runs on a schedule or webhook trigger, and everything stays consistent because the logic is identical every time.

The Automated Workflow

We'll build this using three complementary AI tools sitting behind an orchestration engine. The orchestrator handles the sequencing, data mapping, and conditional logic. Pick the one that suits your infrastructure; all three can do this job.

Architecture Overview

The workflow follows a simple three-step sequence:

  1. Ingest the contract PDF and extract relevant sections using Chat with PDF by Copilotus.
  2. Generate a concise summary using Resoomer AI.
  3. Create a formatted client summary document using Wordsmith AI.

The orchestrator sits at the centre, managing the file handling, API calls, and data transformations between each step.

Prerequisites and Setup

You'll need accounts for all three AI tools with API keys. Most require paid plans for API access; free tiers are typically web-only. Store your keys in your orchestrator's secure credential store, not in plain text.

For this example, we'll focus on n8n (self-hosted or cloud) as the orchestration engine. It's reliable for document workflows and has good error handling. Zapier and Make work similarly; the node structure and data mapping will be analogous.

Step 1:

Trigger and File Ingestion

Set up an n8n workflow with a webhook trigger. This allows external systems (your document management platform, email, or scheduling tool) to send contracts to the workflow.


POST /webhook/contract-review
Content-Type: application/json

{
  "file_url": "https://storage.example.com/contracts/2024-01-contract.pdf",
  "client_name": "Acme Corp",
  "contract_type": "Service Agreement",
  "send_summary_to": "client@acmecorp.com"
}

In n8n, add a Webhook node set to POST. Then add an HTTP Request node to download and validate the file.

{
  "method": "GET",
  "url": "{{ $json.file_url }}",
  "headers": {
    "Authorization": "Bearer {{ $credentials.storage_auth_token }}"
  },
  "encoding": "binary"
}

This retrieves the PDF file and passes it to the next step.

Step 2:

Contract Analysis with Chat with PDF

Chat with PDF by Copilotus accepts PDF uploads and processes them through its API. You'll need to send the PDF binary data and specify what information you want extracted.

Create an HTTP Request node in n8n configured as follows:

{
  "method": "POST",
  "url": "https://api.copilotus.ai/v1/chat-pdf/analyse",
  "headers": {
    "Authorization": "Bearer {{ $credentials.copilotus_api_key }}",
    "Content-Type": "application/json"
  },
  "body": {
    "pdf_base64": "{{ Buffer.from($binary.data).toString('base64') }}",
    "query": "Extract the following from this contract: parties involved, key dates, payment terms, termination clauses, liability caps, and confidentiality obligations. Format as structured JSON.",
    "response_format": "json"
  }
}

The API returns structured JSON with extracted data. Store this output in a variable; you'll reference it in the next steps.

Important: Chat with PDF has rate limits of roughly 100 requests per hour on standard plans. If you're processing multiple contracts simultaneously, queue them rather than running them in parallel.

Step 3:

Summary Generation with Resoomer AI

Resoomer AI specialises in text summarisation. Feed it the extracted contract data from step 2, and it'll produce a concise summary.

Create another HTTP Request node:

{
  "method": "POST",
  "url": "https://api.resoomer.com/v2/summarize",
  "headers": {
    "Authorization": "Bearer {{ $credentials.resoomer_api_key }}",
    "Content-Type": "application/json"
  },
  "body": {
    "text": "{{ $json.previous_step.extracted_content }}",
    "summary_type": "key_points",
    "percentage": 30,
    "language": "en"
  }
}

The percentage parameter controls summary length. For contract summaries, 25-35% often works well; adjust based on your typical contract size.

Resoomer returns a summary as plain text. Capture this in a workflow variable called contract_summary.

Step 4:

Document Generation with Wordsmith AI

Wordsmith AI takes raw text and generates formatted, client-ready documents. This is where your summary becomes a polished PDF or Word file.

Add a Wordsmith node (or use HTTP Request if Wordsmith doesn't have native n8n integration):

{
  "method": "POST",
  "url": "https://api.wordsmith.ai/v1/documents/generate",
  "headers": {
    "Authorization": "Bearer {{ $credentials.wordsmith_api_key }}",
    "Content-Type": "application/json"
  },
  "body": {
    "template": "legal_contract_summary",
    "data": {
      "client_name": "{{ $json.client_name }}",
      "contract_type": "{{ $json.contract_type }}",
      "summary": "{{ $json.contract_summary }}",
      "extracted_terms": "{{ $json.extracted_terms }}",
      "date_generated": "{{ new Date().toISOString() }}",
      "prepared_by": "Legal AI Review System"
    },
    "output_format": "pdf",
    "styling": "professional"
  }
}

Wordsmith generates a PDF file and returns a download URL. Store this URL for the final step.

Step 5:

Delivery and Storage

Most workflows need to do something with the finished document. Common options include:

Email delivery: Add a Send Email node in n8n. Attach the generated PDF.

{
  "email": "{{ $json.send_summary_to }}",
  "subject": "Contract Summary: {{ $json.contract_type }} - {{ $json.client_name }}",
  "body": "Your contract summary is attached. Please review the key terms outlined below.",
  "attachments": [
    {
      "url": "{{ $json.document_download_url }}",
      "filename": "{{ $json.client_name }}_contract_summary.pdf"
    }
  ]
}

Cloud storage: Use a Google Drive or AWS S3 node to save the document for record-keeping.

{
  "method": "POST",
  "url": "https://s3.amazonaws.com/your-bucket/contracts/summaries/",
  "headers": {
    "Authorization": "AWS4-HMAC-SHA256 {{ $credentials.aws_signature }}"
  },
  "body_binary": "{{ $binary.pdf_data }}",
  "filename": "{{ $json.client_name }}_{{ new Date().toISOString().split('T')[0] }}_summary.pdf"
}

CRM or document management system: If you use Airtable, Notion, or Salesforce, create a record with the summary and document link.

Complete Workflow Configuration in n8n

Here's a minimal but functional n8n workflow definition:

{
  "name": "Contract Review and Client Summary",
  "nodes": [
    {
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "parameters": {
        "path": "contract-review",
        "httpMethod": "POST"
      }
    },
    {
      "name": "Download PDF",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "{{ $json.file_url }}",
        "method": "GET",
        "encoding": "binary"
      }
    },
    {
      "name": "Extract with Chat PDF",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.copilotus.ai/v1/chat-pdf/analyse",
        "method": "POST",
        "headers": {
          "Authorization": "Bearer {{ $credentials.copilotus_api_key }}"
        },
        "body": {
          "pdf_base64": "{{ Buffer.from($binary.data).toString('base64') }}",
          "query": "Extract: parties, dates, payment terms, termination, liability, confidentiality. Return JSON."
        }
      }
    },
    {
      "name": "Summarise with Resoomer",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.resoomer.com/v2/summarize",
        "method": "POST",
        "headers": {
          "Authorization": "Bearer {{ $credentials.resoomer_api_key }}"
        },
        "body": {
          "text": "{{ $json.previous_step.extracted_content }}",
          "percentage": 30
        }
      }
    },
    {
      "name": "Generate Document",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.wordsmith.ai/v1/documents/generate",
        "method": "POST",
        "headers": {
          "Authorization": "Bearer {{ $credentials.wordsmith_api_key }}"
        },
        "body": {
          "template": "legal_contract_summary",
          "data": {
            "client_name": "{{ $json.client_name }}",
            "summary": "{{ $json.summary_text }}",
            "date_generated": "{{ new Date().toISOString() }}"
          },
          "output_format": "pdf"
        }
      }
    },
    {
      "name": "Send Email",
      "type": "n8n-nodes-base.sendGrid",
      "parameters": {
        "from_email": "legal@yourcompany.com",
        "to_email": "{{ $json.send_summary_to }}",
        "subject": "Contract Summary Ready",
        "text": "Your contract analysis is ready. See attachment."
      }
    }
  ],
  "connections": {
    "Webhook": ["Download PDF"],
    "Download PDF": ["Extract with Chat PDF"],
    "Extract with Chat PDF": ["Summarise with Resoomer"],
    "Summarise with Resoomer": ["Generate Document"],
    "Generate Document": ["Send Email"]
  ]
}

The Manual Alternative

If you want human control at certain checkpoints, insert approval steps into the workflow. Add a manual trigger node after the extraction step. This pauses the workflow and sends a notification to a reviewer, who can inspect the extracted terms before summarisation proceeds.

In n8n, add a Manual Trigger node with a form that displays the extracted contract data. The reviewer confirms accuracy, then clicks "Continue" to move to summarisation. This takes roughly five minutes per contract instead of forty-five.

Use this approach for high-value contracts or ones with complex terms. For routine agreements, run the fully automated version.

Pro Tips

Rate limit management. Chat with PDF and Resoomer both have hourly quotas on their standard plans. If you're processing ten contracts on a Monday morning, the workflow will hit rate limits and fail. Use n8n's Delay node to space out API calls by a few seconds, or implement exponential backoff retry logic. For heavy volume, upgrade to higher-tier plans that offer more generous quotas.

Error handling and dead letter queues. Contracts with unusual layouts or poor PDF quality sometimes confuse Chat with PDF. Set up error handling in your orchestrator. When extraction fails, log the contract URL and metadata to a Google Sheet or database table marked as "requires manual review". Check this queue daily rather than losing the contract entirely.

Customise extraction prompts per contract type. Service agreements, NDAs, and purchase agreements have different key terms. Store multiple extraction prompts in your orchestrator config. Route contracts based on their type and use the appropriate prompt. This improves extraction accuracy significantly.

Cost optimisation through batching. If you have flexibility on timing, batch contracts into a nightly workflow rather than triggering one-by-one throughout the day. This lets you negotiate better rates with API providers for off-peak processing, and you'll hit bulk pricing tiers faster.

Version and audit trails. Store every generated summary and extracted data in your document management system with timestamps. Link them to the original PDF. This creates a complete audit trail for compliance and makes it easy to track what changed between versions if a client disputes a term.

Cost Breakdown

ToolPlan NeededMonthly CostNotes
Chat with PDF by CopilotusPro or API Plan£50-150100-500 requests/hour depending on tier. Overages charge per 1,000 pages.
Resoomer AIProfessional API£30-8050,000-200,000 words/month. Text summarisation only; no page limits.
Wordsmith AIBusiness or Enterprise£60-200Template-based document generation. Enterprise tier needed for custom styling and batch processing.
n8n (cloud)Pro or Higher£50-100n8n's standard plan covers ~50,000 workflow executions/month. Self-hosting n8n costs only server fees.
Storage (AWS S3 or Google Drive)Standard£10-30Storing PDFs and summaries. Minimal unless you're processing hundreds of contracts monthly.
Email delivery (SendGrid or similar)Standard£10-20Included in most plans if you're sending fewer than 100,000 emails/month.
Total Monthly£210-580Varies by contract volume. One-time setup: 4-6 hours of configuration time.

Cost per contract: With this setup, your per-contract cost drops to roughly £2-5 depending on file size and volume. Manual review at an average billing rate of £150/hour costs £50-75 per contract in labour alone.

Invest the time upfront to configure this properly, and the payback period is typically three to four weeks.