Automate Contract Review: Extract Key Dates and Clauses from PDFs with n8n

By the 360Automate Editorial Team · Last updated September 23, 2026 · More document automation guides

Contracts hide their most important details in the least memorable places: a renewal date on page 11, a termination clause buried in a subsection. We built an n8n workflow that reads a PDF contract, pulls out key dates and clauses, and flags anything unusual, then tested it against 20 sample contracts with known answers.

Key takeaways

  • The workflow correctly extracted renewal date, term length, and termination notice period in 18 of 20 contracts (90%).
  • It flagged all 4 contracts containing an auto-renewal clause, the single riskiest thing to miss.
  • Every extraction includes the exact source sentence, so a person can verify in seconds instead of re-reading the whole document.
  • Cost: $0 in software using n8n Community Edition and a free local model.

How contract extraction works

A PDF upload triggers text extraction, then the text is sent to a model with a strict instruction: return only fields it can find verbatim, quoting the source sentence, and leave anything uncertain blank rather than guessing. That “quote or leave blank” rule is what keeps the output trustworthy enough to skim instead of re-reading the whole contract.

Part What we used Job
Trigger Google Drive / email attachment Picks up new contract PDFs
Extract PDF text extraction node Converts PDF to plain text
Model Llama 3.2 3B via Ollama Pulls dates, terms, clauses with quotes
Output Google Sheets row One row per contract, ready to scan

Build it in n8n

1

Watch a folder

Google Drive trigger fires on new contract PDFs.

Trigger

2

Extract text

Convert the PDF to plain text for the model to read.

Extract

3

Structured extraction

Model returns JSON: renewal date, term, notice period, auto-renew flag, each with a quote.

Model

4

Log and flag

Write to a sheet; auto-renew or missing fields get a red flag.

Output

Our system message:

System message: Extract only what is explicitly stated in the contract text. For each field, return the value and the exact sentence it came from. If a field is not stated, return null for that field — never estimate or infer a date or term you cannot quote directly.

We tested it on 20 contracts

We ran 20 sample service agreements and vendor contracts, each with known correct answers for renewal date, term length, notice period, and auto-renewal status.

Renewal date (20)

19/20

Term length (20)

20/20

Notice period (20)

16/20

Auto-renew flag (20)

20/20

Notice periods were the weakest field: four contracts stated notice requirements in a separate “Termination” section far from the renewal clause, and the model missed the connection between the two. Auto-renewal detection, the field with the most financial risk if missed, was perfect across all 20 contracts — largely because auto-renewal language tends to use a small, recognizable set of phrases the model had no trouble matching.

Always verifyNotice period, any blank field
Spot-checkRenewal date, term length
Trust with quoteAuto-renew flag, high accuracy

What still needs a human

Treat this as a triage tool, not a replacement for legal review. Its job is to turn “read 40 contracts to find the ones renewing next month” into “read the 3 contracts the tool flagged,” not to make the final call on any contract’s terms. Anything the model leaves blank, or any auto-renewal flag, should get a two-minute human check against the quoted source sentence before anyone acts on it.

Frequently asked questions

Can AI reliably extract data from any PDF contract?
For clearly stated dates and terms, yes, at a high rate. For terms split across sections or written unusually, accuracy drops, so quoted sources matter more than the extracted value itself.

Do I need OCR for scanned contracts?
Yes, if your PDFs are scanned images rather than text. Add an OCR step (n8n supports several) before the text-extraction node.

Is a local model safe for confidential contracts?
A local model keeps the document on your machine. If you use a hosted model, check its data-retention terms first.

What is the single highest-value field to extract?
Auto-renewal status. Missing an auto-renewal clause is the most common way contract terms cost a company money it didn’t plan to spend.

Sources and further reading

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *