Chat with local documents using Ollama and MariaDB Vector cache
Ready for 3.0What this workflow does
This AI workflow has 28 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Ollama Chat Model, Embeddings Ollama and MySQL.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Ingestion settings (Edit Fields (Set)): sets 4 fields: ollama_url, embedding_model, ftp_path…
- Chat settings (Edit Fields (Set)): sets 3 fields: ollama_url, embedding_model, top_k
- List file on FTP server (FTP): list
- Look up answer in cache (MySQL): run a query
- Download file from FTP (FTP): uses FTP
- Answer already cached? (If): checks a condition and branches into true / false
- Extract text from file (Extract from File): extracts data from a file (text)
- Return cached answer (Edit Fields (Set)): sets 1 field: output
- Embed question with Ollama (HTTP Request): calls an HTTP API (POST)
- Classify document with LLM (Basic LLM Chain): sends a prompt to an LLM, with model: Ollama classification model; output parser: Parse summary and category
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (18)
- Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - Embeddings Ollama
@n8n/n8n-nodes-langchain.embeddingsOllama - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - FTP
n8n-nodes-base.ftp - Extract from File
n8n-nodes-base.extractFromFile - Manual Trigger
n8n-nodes-base.manualTrigger - Simple Vector Store
@n8n/n8n-nodes-langchain.vectorStoreInMemory - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - HTTP Request
n8n-nodes-base.httpRequest - MySQL
n8n-nodes-base.mySql - AI Agent
@n8n/n8n-nodes-langchain.agent - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Edit Fields (Set)
n8n-nodes-base.set
From the author
Quick Overview This workflow ingests documents from an FTP server into MariaDB Vector using Ollama embeddings, then provides a local chat interface that answers questions with retrieved context and caches repeated questions in a MariaDB Q&A table. How it…