Local AI Automation
Local AI

How to Build a Private AI Email Assistant with Ollama + n8n

A complete walkthrough of building a privacy-first AI email assistant using Ollama for local LLM inference and n8n for automation — no cloud APIs required.

Piyabhum Sornpaisarn1 min read

Intro

Most AI email tools send your messages to OpenAI or Google. If you handle support, invoices, or customer data, that's a problem. This guide shows a fully private alternative.

A local AI email assistant uses Ollama to run a small LLM on your hardware and n8n to read, classify, and act on emails — without any data leaving your network. For a 16GB GPU, a 7B–8B model (Qwen 2.5 or Llama 3.1) classifies email reliably at 5–15 emails/minute.

What you need

  • Ollama installed locally
  • n8n (self-hosted or desktop)
  • A Gmail app password (or IMAP credentials)

Step 1 — Pick a local LLM

For email classification, small fast models beat large slow ones.

ollama pull qwen2.5:7b

Step 2 — Connect n8n to Ollama

Use the HTTP Request node against http://host.docker.internal:11434/api/chat if n8n runs in Docker.

Step 3 — Build the classification flow

(coming soon — supporting articles cover each step in depth.)

Q: Does this work without a GPU? A: Yes, but CPU inference is 5–10× slower. A quantized 7B model is usable on CPU for low volume.