Hands-On Lab Workshop

Local AI Workflows
with n8n

Build 7 real AI workflows using n8n, Ollama, Docker, and Qdrant โ€” completely free, no API keys, runs on your own machine.

๐Ÿณ Dockerโšก n8n๐Ÿค– Ollama ๐Ÿ” Qdrant๐Ÿง  7 Exercises๐Ÿ’ป CPU Only ๐Ÿ”‘ No API Keys๐Ÿ†“ Free & Open Source
๐Ÿš€ Get Started ๐Ÿ“ฅ Download Files

๐Ÿ› ๏ธ Installation Guide
Follow these steps on Windows before the workshop. Only needs to be done once.
1๏ธโƒฃ

Install Docker Desktop

Download and install Docker Desktop for Windows. Enable WSL2 when prompted during installation.

โฌ‡๏ธ Download Docker Desktop
Verify installation
docker --version
docker compose version
โš ๏ธ Restart your computer after Docker Desktop installs. The Docker whale icon must appear in the Windows system tray before continuing.
2๏ธโƒฃ

Clone the n8n AI Starter Kit

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
โœ… Expected: 4 containers running โ€” n8n, ollama, postgres, qdrant
3๏ธโƒฃ

Verify Services

Open these URLs in your browser to confirm everything is running correctly.

n8n Dashboard
http://localhost:5678
Qdrant Dashboard
http://localhost:6333/dashboard
๐Ÿ’ก Always use http://ollama:11434 inside n8n nodes โ€” never localhost. Containers communicate using service names.
4๏ธโƒฃ

First Login to n8n

When you open n8n for the first time it asks you to create an account. Use these workshop credentials:

Emailadmin@n8n.local
PasswordAdmin@1234
First NameAdmin
Last NameUser
โš ๏ธ For lab use only.

๐Ÿ”ฅ Warm-Up Commands
Run these before the workshop. Total download ~9 GB. Only needs to be done once.
๐Ÿค–

Pull All AI Models

# 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
๐Ÿ“

File Folder Setup โ€” Exercise 3

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 .
โš ๏ธ The dot (.) at the end of the download command means "save to my current folder".

๐Ÿงช The 7 Exercises
Each exercise builds on the previous. Download the workflow JSON, import it into n8n, and follow the lab manual.
1
๐Ÿ” AI Code Reviewer
Webhook ยท Basic LLM Chain ยท tinyllama
โฑ 15 min3 Nodes

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.

Webhook โ†’ Basic LLM Chain โ†’ Respond to Webhook โ†‘ Ollama Model (tinyllama)
NodeKey Parameter
WebhookPath: roast-my-code ยท Method: POST ยท Response Mode: Response Node
Basic LLM ChainPrompt (Expression): ={{ $json.body.code }}
Ollama Modelhttp://ollama:11434 ยท Model: tinyllama
Respond to Webhook={{ JSON.stringify({ roast: $json.text }) }}
2
๐Ÿง  Explain Like I'm 5
Webhook ยท Basic LLM Chain ยท Prompt Engineering ยท phi3:mini
โฑ 15 min3 Nodes

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.

Webhook โ†’ Basic LLM Chain โ†’ Respond to Webhook โ†‘ Ollama Model (phi3:mini)
NodeKey Parameter
WebhookPath: explain-eli5 ยท Method: POST ยท Response Mode: Response Node
Prompt=Explain {{ $json.body.topic }} like I am a 5 year old...
System MessageYou are a friendly teacher. Use simple words. No jargon...
Respond to Webhook={{ JSON.stringify({ explanation: $json.text }) }}
3
๐Ÿ“‚ AI File Summariser
Manual Trigger ยท Docker File Handling ยท phi3:mini
โฑ 15 min6 Nodes

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.

Manual Trigger โ†’ Read File โ†’ Extract from File โ†’ Basic LLM Chain โ†‘ Ollama Model (phi3:mini) โ†“ Convert to File โ†’ Write File
Docker file 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 .
NodeKey Parameter
Read File/home/node/.n8n-files/document.txt
Prompt={{ $json.data }} (Expression mode)
System MessageSummarise in exactly 3 clear sentences...
Write File/home/node/.n8n-files/summary.txt
4
๐ŸŒ Simple HTTP Request
Chat Trigger ยท HTTP Request ยท Edit Fields ยท Public API
โฑ 5 min3 NodesNo AI Model

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.

Chat Trigger โ†’ HTTP Request โ†’ Edit Fields (catfact.ninja) (extracts fact)
NodeKey Parameter
HTTP RequestMethod: GET ยท URL: https://catfact.ninja/fact
Edit FieldsName: fact ยท Value: ={{ $json.fact }}
Advice API (bonus)https://api.adviceslip.com/advice โ†’ $json.slip.advice
โฌ‡๏ธ Workflow JSON
5
๐Ÿงฎ AI Calculator
Chat Trigger ยท AI Agent ยท Calculator Tool ยท Simple Memory ยท qwen2.5:3b
โฑ 10 minAI Agent

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.

Chat Trigger โ†’ AI Agent โ†’ Response โ†‘ โ†‘ โ†‘ Chat Model Memory Calculator (qwen2.5:3b) (10) Tool
NodeKey Parameter
AI AgentSystem: You are a helpful financial assistant...
Ollama Chat Modelhttp://ollama:11434 ยท qwen2.5:3b ยท keepAlive: 1h ยท numPredict: 200
Simple MemoryContext Window Length: 10
Calculator ToolNo parameters needed
โฌ‡๏ธ Workflow JSON
6
๐Ÿ’พ AI Interaction Logger
Chat Trigger ยท AI Agent ยท Code Tool ยท Insert Row ยท Data Table
โฑ 15 minAI Agent + DB

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.

Chat Trigger โ†’ AI Agent โ†’ Insert Row (Data Table) โ†‘ โ†‘ โ†‘ Chat Model Memory Code Tool
Code Tool โ€” JavaScript
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.`;
FieldExpression
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) }}
7
๐Ÿ” RAG Pipeline
Two Workflows ยท Qdrant ยท mxbai-embed-large ยท qwen2.5:3b
โฑ 20 minTwo WorkflowsVector DB

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.

Workflow 1: n8n Form โ†’ Qdrant (insert) โ† Embeddings + Text Splitter Workflow 2: Chat Trigger โ†’ AI Agent โ†’ Response โ†‘ โ†‘ โ†‘ Model Memory Qdrant Retriever โ† Embeddings Ollama
SettingValue
Qdrant Collectionrag_collection ยท Vector Size: 1024 ยท Distance: Cosine
Text SplitterChunk Size: 200 ยท Chunk Overlap: 50
Embedding Modelmxbai-embed-large:latest (both workflows)
Tool Nameretriever
Chat Modelqwen2.5:3b ยท keepAlive: 1h ยท numPredict: 150
โš ๏ธ The Qdrant retriever needs its own separate Embeddings Ollama node โ€” it cannot share the one from Workflow 1.

๐Ÿ“ฅ All Downloads
Everything you need for the workshop in one place.
๐Ÿ“–

Complete Lab Manual

All 7 exercises โ€” step-by-step instructions, parameters, troubleshooting, and bonus challenges.

โฌ‡๏ธ Download PDF
๐Ÿ“Š

Workshop Presentation

21-slide PPT โ€” Docker, n8n, Ollama, Qdrant setup and all 7 exercises with input/output examples.

โฌ‡๏ธ Download PPTX
๐Ÿ“

MCQ Assessment

2 sets ร— 15 questions covering all 7 exercises. Answer key on the last page.

โฌ‡๏ธ Download PDF
๐Ÿ“„

Sample RAG PDF

One-page document about RAG for Exercise 7 testing. Contains 6 labelled sources.

โฌ‡๏ธ Download PDF
๐Ÿ“‚

All Workflow Files

All 7 workflow JSON files numbered to match the lab manual. Import directly into n8n.

๐Ÿ“‚ Browse GitHub Repo
๐ŸŒ

Browser Testers

HTML tester pages for Exercise 1 (Code Reviewer) and Exercise 2 (ELI5) โ€” open in any browser.

โฌ‡๏ธ ELI5 Tester