GuideIntermediate
n8n Document AI: Extraction, OCR and RAG for Invoices and Contracts
Build and offer Document AI systems as a service with n8n: OCR for scanned documents, structured extraction from invoices and contracts, classification and routing with human review, and question-answering (RAG) over your own documents. Everything runs 100% self-hosted at zero cost with the Self-hosted AI Starter Kit (n8n, Ollama, Qdrant, and PostgreSQL), with no prior AI experience required: OCR, embeddings, RAG, and agent concepts are taught from scratch. It closes with agentic Document AI (native agents and MCP) and an end-to-end final project: a service that ingests, classifies, extracts, answers questions, and handles exceptions, ready to defend in an interview or sell as a freelance service.
- lessons
- 64
- modules
- 8
- available in
- English · Spanish
- certificate
- Yes
- access
- Free

What you'll be able to do
- Understand the anatomy of a Document AI pipeline and decide between self-hosted Community and n8n Cloud
- Install the Self-hosted AI Starter Kit and work with binary data in n8n
- Extract text from native PDFs, apply OCR to scanned documents and images, and use vision models for documents
- Extract structured data with the Information Extractor node and JSON schemas: invoice line items, contract clauses, and terms
- Classify documents with LLMs, route them with Switch and branches, and insert human review into the loop
- Set up a RAG pipeline over your documents: embeddings, chunking, vector stores (Qdrant), retrieval, and cited answers
- Build agentic Document AI with the native AI Agent node, tools, multi-agent delegation, and MCP (n8n client and server)
- Handle errors, retries, reprocessing, and idempotency, and measure extraction accuracy
- Bring it all together in an end-to-end Document AI service: ingestion, classification, extraction, RAG, and an agentic exception layer
What you need to bring
It's for you if...
- n8n automation builders who want to build Document AI pipelines (invoices, contracts) with no prior AI experience
- Freelancers or consultants looking to offer Document AI as a sellable service
- Accounting, legal-ops, or backoffice teams that process invoices and contracts by hand and want to automate it
- Anyone preparing a portfolio or interview case with an end-to-end OCR, extraction, RAG, and agents example
Requirements and materials
- n8n fundamentals (nodes, triggers, expressions, and the editor) and comfort reading/building JSON and calling APIs
- No prior AI or Document AI experience required: OCR, embeddings, RAG, and agents are taught from scratch
- Docker installed to run the Self-hosted AI Starter Kit (n8n, Ollama, Qdrant, and PostgreSQL)
The syllabus, module by module
Open any of them to see its lessons.
- 1. What Document AI is and what you'll build
- 2. Anatomy of a Document AI pipeline
- 3. Why n8n for automating documents
- 4. Self-hosted Community vs n8n Cloud: the cost decision
- 5. Installing the Self-hosted AI Starter Kit
- 6. Touring the n8n 2.x interface
- 7. Your first workflow: from file to text
- 8. Mini-project: your Document AI lab at $0
- 1. Introduction: why ingestion is harder than extraction
- 2. Document triggers and sources
- 3. Working with binary data in n8n
- 4. Extracting text from native PDFs
- 5. OCR for scanned documents and images
- 6. Vision models for documents
- 7. Cleaning and normalizing extracted text
- 8. Mini-project: a universal document intake
What people usually ask
No limit. It's a free guide: come in whenever you like, as often as you like.
No. Modules run from easier to harder, but you can jump to the one you need. Progress is saved per lesson.
Whatever is needed is listed under “What you need to bring”, above. If nothing is listed there, you can start from zero.
In the WhatsApp group, and every two weeks there's a live with an instructor where questions get worked through.
Yes. When you finish every lesson you get a statement of completion. Pass the guide's certification exam and it becomes a certificate, with a verifiable code you can share on LinkedIn.
Start whenever you like
What students say
These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.
No approved reviews yet.
Be the first to share your experience!