Local document question answering with Ollama AI, Agentic RAG & PGVector
Knowledge & search workflow for n8n with 35 active steps. Starts with Chat Trigger, Webhook, Local File Trigger. Uses Ollama, OpenAI. Integrations include PostgreSQL, Ollama, OpenAI.
What it does
35 active nodes · Starts with Chat Trigger, Webhook, Local File Trigger.
Steps in the template include:
- Default Data Loader (Default Data Loader)
- Extract Document Text (Extract from File) — text
- Postgres Chat Memory (Postgres Chat Memory)
- Set File ID (Edit Fields (Set))
Nodes and integrations
- Default Data Loader
- Extract from File ×4
- Postgres Chat Memory
- Edit Fields (Set) ×3
- Respond to Webhook
- Chat Trigger
- Webhook
- Aggregate
- Summarize
- AI Agent
- Switch
- Postgres ×7
- postgres Tool ×3
- Loop Over Items (Split in Batches)
- Local File Trigger
- Read/Write Files from Disk
- Embeddings Ollama ×2
- Recursive Character Text Splitter
- OpenAI Chat Model
- Postgres PGVector Store ×2
See the author’s step names
- Default Data Loader (Default Data Loader)
- Extract Document Text (Extract from File) — text
- Postgres Chat Memory (Postgres Chat Memory)
- Set File ID (Edit Fields (Set))
- Respond to Webhook (Respond to Webhook)
- Edit Fields (Edit Fields (Set))
- When chat message received (Chat Trigger)
- Webhook (Webhook)
- Extract PDF Text (Extract from File) — pdf
- Aggregate (Aggregate)
- Summarize (Summarize)
- RAG AI Agent (AI Agent)
- Switch (Switch)
- Extract from Excel (Extract from File) — xlsx
- Set Schema (Edit Fields (Set))
- Extract from CSV (Extract from File)
- Create Document Metadata Table (Postgres) — executeQuery
- Create Document Rows Table (for Tabular Data) (Postgres) — executeQuery
- List Documents (postgres Tool) — select
- Get File Contents (postgres Tool) — executeQuery
- Query Document Rows (postgres Tool) — executeQuery
- Loop Over Items (Loop Over Items (Split in Batches))
- Insert Document Metadata (Postgres) — upsert
- Insert Table Rows (Postgres)
- Update Schema for Document Metadata (Postgres) — upsert
- Local File Trigger (Local File Trigger)
- Read/Write Files from Disk (Read/Write Files from Disk)
- Embeddings Ollama (Embeddings Ollama)
- Embeddings Ollama1 (Embeddings Ollama)
- Recursive Character Text Splitter (Recursive Character Text Splitter)
- Ollama (Change Base URL) (OpenAI Chat Model)
- Delete Old Doc Records (Postgres) — executeQuery
- Delete Old Data Records (Postgres) — executeQuery
- Postgres PGVector Store (Postgres PGVector Store)
- Postgres PGVector Store1 (Postgres PGVector Store)
Accounts and credentials
- PostgreSQL
- Ollama instance
- OpenAI access
AI models and swaps
Ollama · Embeddings
nomic-embed-text:latest in Embeddings Ollama. Changing the embedding model may require rebuilding the vector index and matching its dimensions.
Ollama · Embeddings
nomic-embed-text:latest in Embeddings Ollama1. Changing the embedding model may require rebuilding the vector index and matching its dimensions.
OpenAI · Chat
qwen2.5:14b-8k in Ollama (Change Base URL). Potentially swappable with a compatible n8n chat model node. Match tool calling before testing.
Inputs and setup options
- When chat message received: public chat is enabled in the template
- Webhook: HTTP POST
Resource information
- Credit basis
- Author listed by n8n
- Pricing
- Template access shown on n8n
- License
- Not specified
- Last record update
- Nov 5, 2026
