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
- Each email goes to Ollama with a prompt returning structured JSON: URGENT, REPLY_TODAY, FYI or JUNK
- Malformed responses fall back to a safe default
- URGENT emails get a formatted alert
- All emails are aggregated into one digest with suggested actions and totals
- Errors produce a structured error record
Do it yourself
- Import the template into self-hosted n8n
- Create an Ollama credential (e.g. http://host.docker.internal:11434)
- Pull gemma4:e4b or change the model
- Replace the sample generator with Gmail or Outlook
- 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.
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.
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.
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.