Build 7 real AI workflows using n8n, Ollama, Docker, and Qdrant โ completely free, no API keys, runs on your own machine.
Download and install Docker Desktop for Windows. Enable WSL2 when prompted during installation.
โฌ๏ธ Download Docker Desktopdocker --version docker compose version
Open PowerShell and run these commands to download and start the n8n AI Starter Kit.
# Clone the starter kit git clone https://github.com/n8n-io/self-hosted-ai-starter-kit.git cd self-hosted-ai-starter-kit # Start all services in CPU mode docker compose --profile cpu up -d # Check all 4 containers are running docker ps
Open these URLs in your browser to confirm everything is running correctly.
http://localhost:5678
http://localhost:6333/dashboard
http://ollama:11434 inside n8n nodes โ never localhost. Containers communicate using service names.When you open n8n for the first time it asks you to create an account. Use these workshop credentials:
admin@n8n.local | |
| Password | Admin@1234 |
| First Name | Admin |
| Last Name | User |
# Exercise 1 โ AI Code Reviewer docker exec -it ollama ollama pull tinyllama # Exercises 2 and 3 โ ELI5 + File Summariser docker exec -it ollama ollama pull phi3:mini # Exercises 5 and 6 โ Calculator + Logger docker exec -it ollama ollama pull qwen2.5:3b # Exercise 7 โ RAG embeddings docker exec -it ollama ollama pull mxbai-embed-large # Verify all models downloaded docker exec -it ollama ollama list
Run at the start of each session before Exercise 3. The folder is lost on every Docker restart.
# Create shared folder inside n8n container docker exec -it n8n mkdir -p /home/node/.n8n-files # Upload file (from your current folder) docker cp document.txt n8n:/home/node/.n8n-files/document.txt # Download result (to your current folder โ dot = here) docker cp n8n:/home/node/.n8n-files/summary.txt .
Submit any code snippet via HTTP POST and receive a professional AI code review โ issues found and improvements suggested. Test using the browser HTML tester page provided.
| Node | Key Parameter |
|---|---|
| Webhook | Path: roast-my-code ยท Method: POST ยท Response Mode: Response Node |
| Basic LLM Chain | Prompt (Expression): ={{ $json.body.code }} |
| Ollama Model | http://ollama:11434 ยท Model: tinyllama |
| Respond to Webhook | ={{ JSON.stringify({ roast: $json.text }) }} |
Submit any CS topic and receive a simple, jargon-free explanation anyone can understand. Teaches prompt engineering โ how the system message completely changes the AI output style.
| Node | Key Parameter |
|---|---|
| Webhook | Path: explain-eli5 ยท Method: POST ยท Response Mode: Response Node |
| Prompt | =Explain {{ $json.body.topic }} like I am a 5 year old... |
| System Message | You are a friendly teacher. Use simple words. No jargon... |
| Respond to Webhook | ={{ JSON.stringify({ explanation: $json.text }) }} |
Upload a text document into the n8n Docker container, let AI summarise it in exactly 3 sentences, and download the result. Teaches Docker file handling with docker cp commands.
# Create folder (run after every Docker restart) docker exec -it n8n mkdir -p /home/node/.n8n-files # Upload document to container docker cp document.txt n8n:/home/node/.n8n-files/document.txt # Download summary to current folder docker cp n8n:/home/node/.n8n-files/summary.txt .
| Node | Key Parameter |
|---|---|
| Read File | /home/node/.n8n-files/document.txt |
| Prompt | ={{ $json.data }} (Expression mode) |
| System Message | Summarise in exactly 3 clear sentences... |
| Write File | /home/node/.n8n-files/summary.txt |
Fetch live data from a public API and display it in the n8n chat. Teaches HTTP GET requests and JSON response handling โ the foundation of all API integrations in n8n.
| Node | Key Parameter |
|---|---|
| HTTP Request | Method: GET ยท URL: https://catfact.ninja/fact |
| Edit Fields | Name: fact ยท Value: ={{ $json.fact }} |
| Advice API (bonus) | https://api.adviceslip.com/advice โ $json.slip.advice |
A conversational AI financial assistant that uses the built-in Calculator Tool for exact computations and remembers the last 10 messages. Introduces the AI Agent โ n8n's most powerful AI construct.
| Node | Key Parameter |
|---|---|
| AI Agent | System: You are a helpful financial assistant... |
| Ollama Chat Model | http://ollama:11434 ยท qwen2.5:3b ยท keepAlive: 1h ยท numPredict: 200 |
| Simple Memory | Context Window Length: 10 |
| Calculator Tool | No parameters needed |
An AI CS tutor that answers questions AND automatically logs every interaction to an n8n Data Table โ saving the question, answer summary, word count, sentence count, and timestamp permanently.
const input = $input.first().json;
const text = input.code || input.query || input._query || '';
const words = text.trim().split(/\s+/).filter(w => w).length;
const sentences = text.split(/[.!?]+/).filter(s => s.trim()).length;
return `Analysed: ${words} words, ${sentences} sentences.`;
| Field | Expression |
|---|---|
| question | ={{ $('When chat message received').item.json.chatInput }} |
| answer_summary | ={{ $json.output.slice(0, 200) }} |
| word_count | ={{ $json.output.trim().split(/\s+/).length }} |
| sentence_count | ={{ $json.output.split(/[.!?]+/).filter(s=>s.trim()).length }} |
| timestamp | ={{ new Date().toISOString().replace("T"," ").slice(0,19) }} |
Build a full RAG system โ upload a PDF, store it as vectors in Qdrant, then chat with your own document. The AI answers only from your uploaded content, not from training data.
| Setting | Value |
|---|---|
| Qdrant Collection | rag_collection ยท Vector Size: 1024 ยท Distance: Cosine |
| Text Splitter | Chunk Size: 200 ยท Chunk Overlap: 50 |
| Embedding Model | mxbai-embed-large:latest (both workflows) |
| Tool Name | retriever |
| Chat Model | qwen2.5:3b ยท keepAlive: 1h ยท numPredict: 150 |
All 7 exercises โ step-by-step instructions, parameters, troubleshooting, and bonus challenges.
โฌ๏ธ Download PDF21-slide PPT โ Docker, n8n, Ollama, Qdrant setup and all 7 exercises with input/output examples.
โฌ๏ธ Download PPTX2 sets ร 15 questions covering all 7 exercises. Answer key on the last page.
โฌ๏ธ Download PDFOne-page document about RAG for Exercise 7 testing. Contains 6 labelled sources.
โฌ๏ธ Download PDFAll 7 workflow JSON files numbered to match the lab manual. Import directly into n8n.
๐ Browse GitHub RepoHTML tester pages for Exercise 1 (Code Reviewer) and Exercise 2 (ELI5) โ open in any browser.
โฌ๏ธ ELI5 Tester