Home / use case

Email triage and morning digest with a local Ollama model (n8n)

What they built

An n8n community workflow by Salahuddin Uqaili that triages email with a local Ollama model and compiles a morning digest grouped by urgency.

Setup

  • n8n 1.19.4+ (LangChain nodes)
  • Ollama with gemma4:e4b (tested)

How it works

  1. Each email goes to Ollama with a prompt returning structured JSON: URGENT, REPLY_TODAY, FYI or JUNK
  2. Malformed responses fall back to a safe default
  3. URGENT emails get a formatted alert
  4. All emails are aggregated into one digest with suggested actions and totals
  5. Errors produce a structured error record

Do it yourself

  1. Import the template into self-hosted n8n
  2. Create an Ollama credential (e.g. http://host.docker.internal:11434)
  3. Pull gemma4:e4b or change the model
  4. Replace the sample generator with Gmail or Outlook
  5. Add delivery for alerts and the digest (Slack, Telegram or email)
Source: n8n templates · Added 2026-10-18. This write-up summarizes the original source; see it for full details.

Related

Self-hosted bookmarks that tag themselves with local AI (Karakeep)

Karakeep (formerly Hoarder) runs on a Debian LXC, and gemma3:4b in Ollama tags each bookmark. Getting reliable tags from a small model takes one key setting.

peira.dev · 2026-09-04

Hybrid workflow: local for private and repetitive, cloud for hard

A Linux sysadmin stopped trying to replace cloud LLMs. Ollama now handles private docs, overnight article summaries and VS Code autocomplete.

XDA Developers · 2026-05-11

Read-only personal admin assistant over work email and calendar

A project manager juggling a dozen projects has a local bot that builds a wiki from email, surfaces to-dos, sends reminders and drafts replies.

Reddit r/LocalLLM · 2026-04-29

Self-hosted AI email assistant on Linux (n8n + Ollama)

Classifies IMAP mail with llama3.1:8b, routes it, saves reply drafts and extracts action items as JSON. Reports 85-95% classification accuracy.

Linux Professional · 2026-03-08