An n8n and Ollama email triage prototype: Qwen3 8B found the task, but not whose it was
- Hardware
- Apple Silicon Mac with 24 GB of memory
- Models & engines
- Ollama running Qwen3 8B
n8n's Ollama Chat Model and Structured Output Parser nodes - Key gotcha
- At first the model answered that no email had been supplied: the prompt wasn't referencing the previous node's data until he switched to dynamic expressions.
What they built
Adam is building a prototype that reads emails, picks out potential tasks and decides whether each task is actually the recipient's responsibility. The longer-term aim is an organised, prioritised task register that can be corrected and improve over time.
He chose to run the model locally with Ollama on purpose, to see how much AI processing he could do without sending email content to an external model provider. For now the workflow only sees fictional emails and isn't connected to a live mailbox.
Part 1 covers the first working n8n workflow and the most interesting failure so far: telling an action in an email apart from an action that is yours.
Setup
- Apple Silicon Mac with 24 GB of memory
- n8n for the workflow
- Ollama running Qwen3 8B
- n8n's Ollama Chat Model and Structured Output Parser nodes
How it works
- A Manual Trigger starts the workflow.
- An Edit Fields node supplies a fictional email with sender, subject and body.
- A Basic LLM Chain sends it to Qwen3 through the Ollama Chat Model node, referencing the previous node's data with expressions like {{ $json.sender }}, {{ $json.subject }} and {{ $json.body }}.
- A Structured Output Parser makes the model return four fields: action_required (YES, NO or UNCERTAIN), task, reason and priority (HIGH, MEDIUM or LOW).
Results & numbers
- For a distributor's email asking to confirm receipt of a revised programme master, it returned action required YES, task 'Confirm receipt of the revised master and check for issues', priority MEDIUM.
- For an email asking Scheduling to change a transmission date, where Programme Delivery was copied for visibility only, it still returned YES with the scheduling task: it understood the request but not that it belonged to someone else.
Gotchas
- At first the model answered that no email had been supplied: the prompt wasn't referencing the previous node's data until he switched to dynamic expressions.
- 'Does this email contain an action?' and 'does it contain an action I'm responsible for?' are different questions, and the prompt has to ask the second one explicitly.
- Connecting a real organisational mailbox would need proper access permissions and security controls.
“Does this email contain an action that I'm personally responsible for?”— Adam
Do it yourself
- Install n8n and Ollama, and pull a Qwen3 8B model.
- Build Manual Trigger, then Edit Fields with a test email's sender, subject and body.
- Add a Basic LLM Chain using the Ollama Chat Model, and reference the email fields with {{ $json.sender }}, {{ $json.subject }} and {{ $json.body }}.
- Attach a Structured Output Parser with action_required, task, reason and priority.
- Test with emails where you are only copied, and tell the prompt to separate your own responsibilities from actions assigned to others.
Similar setups
Email triage and morning digest with a local Ollama model (n8n)
Classifies each email as URGENT, REPLY_TODAY, FYI or JUNK using gemma4:e4b, sends urgent alerts and builds a grouped morning digest.
A local news-reading agent on Ollama that loses internet access while it thinks
A developer built News Scout, a Qwen3 14B agent on Ollama that picks IT stories from five RSS feeds, then split each run so the model reads the cached feeds inside a macOS sandbox with no internet.
Private Garmin training briefings on a 16 GB MacBook Air with a local Qwen3 4B
Garmin Insights is a macOS app that writes a morning training briefing from your Garmin and Strong data with a local Qwen3 4B in Ollama, measured on a 16 GB MacBook Air M3.
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.