Skip to content
← All demos
002PreviewLegal & Compliance Services

Document Ingestion & Analysis

Splits immense PDF bundles, extracts key data via AI, and auto-sorts contracts, leases, and evidence packets into the right queue.

What it does

Law firms and compliance teams receive discovery bundles, lease packages, and evidence sets as single massive PDFs. Someone splits them, reads them, and files them by hand.

This pipeline does all three: n8n splits the bundle into individual documents, an LLM extracts key entities against a fixed schema, and each document routes to its correct downstream queue automatically.

Every action writes to an audit trail, so the sorting decision is always traceable back to the extracted evidence.

Architecture

How it's wired

  1. 01Presentation
    Next.js on Vercel

    Build page, document upload UI, status and payload rendering.

  2. 02Orchestration
    n8n (cloud-hosted)

    PDF bundle splitting, schema-validated LLM extraction, classification, queue routing.

  3. 03Data
    TODOObject storage + queue selection

    Document storage, extraction records, routing queues, audit log.

  4. 04AI
    OpenAI API (schema-validated calls)

    Entity extraction and document classification from split PDFs.

End-to-end flow

Bundle uploaded via demo page → n8n webhook receives file reference → PDF split into individual documents → LLM extracts entities per fixed schema → each document classified and routed to its queue → audit record written, structured result returned.

Sample payload

What goes in, what comes out

Mock data — representative of the production schema.

Input
{
  "event": "doc.bundle.received",
  "submitted_at": "2026-07-05T14:12:00Z",
  "source": "doc-intake.elwoodberry.com",
  "fields": {
    "filename": "discovery-bundle-0347.pdf",
    "pages": 182,
    "matter_ref": "MOCK-2026-0113"
  }
}
Output
{
  "status": "processed",
  "confidence": 0.94,
  "routed_to": "queue:contracts-review",
  "audit_id": "ias-demo-002-0001"
}

Want this for your team?

Tell me the workflow. I'll show you what it looks like built.

Book a call