Huashu Design
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
An n8n workflow that labels each new email with a model running on your own computer through Ollama, drops spam and drafts a reply for the rest. Nothing is sent.
Local AI email classifier and reply drafter with Ollama is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.
New unread email
It starts when an unread email arrives in the mailbox. Set first:
A draft reply and a label for each email that is not spam, kept in the run data, with nothing sent
What you need before you start.
Mailbox
Starts a run for each new unread email.
NeedsIMAP details
Language model
Labels each email and writes the draft reply on your own computer.
NeedsOllama with llama3:8b
Checked by Mindket on 13 Nov 2026
This n8n workflow sorts each new email with an AI model on your own computer and drafts a reply to every message that is not spam. It reads an inbox over IMAP, the standard way for a program to fetch mail, and asks Ollama to label each message as urgent, a question, feedback, spam or other. Spam is dropped. For the rest, a second request writes a short, friendly reply. The drafts stay in n8n for you to read. Nothing is sent. Five nodes run it.
People who want help with email but would rather not send their mail to an online AI service, such as freelancers, small offices and anyone who runs their own n8n server. It suits a mailbox where a first draft saves time and a person still decides. Skip it if you want replies sent for you, or if you need strong writing, because a small model on a home computer is less capable than the large online ones. Its cousins, Email replies drafted by AI and approved by email and Company knowledge email replies with approve or disapprove, use online models and send the reply after one click.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Privacy | Freelancers | Sort a busy inbox without sharing client mail with an online AI | A freelancer lets Ollama label the morning’s mail and reads the urgent drafts first. |
| Offices | Small offices | Get first drafts for routine questions | An office manager skims drafts for opening hours and price questions. |
| Self hosting | Home lab owners | Run the whole chain on their own hardware | A hobbyist tests how a local model copes with real mail. |
| Education | Teachers | Draft replies to routine questions from parents | A teacher reads drafts for questions about homework before sending anything. |
You need an n8n that can reach Ollama, the llama3:8b model and one IMAP mailbox.
A local or self hosted n8n that can reach your Ollama will run it. n8n Cloud cannot reach an Ollama on your own computer.
localhostlocalhost on your computerDownload saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Import the file, add one IMAP credential, check that Ollama has the model and switch the workflow on.
| Need | Detail |
|---|---|
| n8n | Local or self hosted, on the same computer or network as Ollama |
| Ollama | Installed and running, with llama3:8b downloaded |
| Mailbox | IMAP details for one account |
| Computer | Room for a 4.7GB model |
workflow.json.Email Trigger (IMAP).llama3:8b.http://localhost:11434/api/generate, which is Ollama’s own default address. If n8n cannot reach Ollama there, change the address in both steps.Leave the workflow on. Each unread email gets a label and, unless it is spam, a draft. Open the Executions list, pick a run and read the fields of Prepare Draft for Review. Copy a draft into your mail app to send it.
| To change | Where |
|---|---|
| The labels | The prompt in 1. Classify Email (Ollama) |
| The reply style and its sign off | The prompt in 2. Draft Reply (Ollama) |
| The model | The name llama3:8b in both request bodies |
| How much of an email the model reads | The numbers in substring in both bodies |
| How long each step waits | The timeout option of each Ollama step |
A freelance designer finds three emails after a night. One is a client asking whether Friday’s deadline still holds, one is a pitch from a stranger and one is a thank you note.
The workflow labels them QUESTION, SPAM and FEEDBACK, and the pitch stops there. In the morning she opens the run in the Executions list. The two drafts sit in draft_reply, each beside the sender, a subject that starts with Re: and its label. The draft for the client confirms the deadline, which the model could not know. She rewrites that line and sends both from her own mail app.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Ollama is a program that runs AI models on your own computer and answers requests at a local web address. IMAP is how a program reads an inbox. A trigger is the box that starts a run, and here it fires when an unread email arrives.
For experts. Both model steps are plain HTTP Request nodes against /api/generate, not the Ollama sub nodes.
| Node | What it does | What to know |
|---|---|---|
Email Trigger (IMAP) | Starts a run for each unread email | Its defaults are the INBOX, mark as read and the simple format. The body is in textPlain, not text |
1. Classify Email (Ollama) | Asks for one label | stream is false, so Ollama returns one JSON object and the answer is in response. Temperature 0.1, num_predict 20 |
Filter Spam | Drops items labeled SPAM | A notEquals test on the trimmed reply, ignoring case, so a reply with extra words passes |
2. Draft Reply (Ollama) | Writes the reply body | Temperature 0.5, up to 1000 tokens, timeout 120 seconds |
Prepare Draft for Review | Collects the fields to read | The sender and subject come from the trigger, and the label from the first Ollama call |
It sends nothing, and the drafts exist only in the run data of n8n.
Prepare Draft for Review to use the draftsSPAM. or Spam, because it sells something is not equal to SPAM, and that email is kept and draftedlocalhost on your computer, and an n8n in a container sees its own localhost. n8n’s Ollama notes suggest one user defined Docker network and http://<ollama-container>:11434llama3:8b at 4.7GB with an 8K context window, read on 12 November 2026. Any other model Ollama lists works if you change its name in both stepsdata field that does not exist. It also kept only spam and looked for a body field that the IMAP node does not give. Mindket’s copy fixes all fourAn n8n workflow that labels each new email with an AI model on your own computer, then drafts a reply to every message
that is not spam. The model runs through Ollama, so the mail text never goes to an online AI service. The drafts stay in
n8n for you to read, and nothing is sent.
workflow.json: the workflow as n8n exports it, 5 nodes and no sticky notes. It holds no credential.README.md: these notes.Email Trigger (IMAP) now starts each run, and the node is renamed from Get Unread Emails (IMAP).JSON.parse($json.data).response. The HTTP Request node already turnsdata field. They now read $json.response, which holds theFilter Spam kept only the emails the model called SPAM and stopped everything else. It now drops them and lets thetext. The IMAP node's default format has no such field, so the model saw only thetextPlain.llama3:8b downloaded. It is a 4.7GB model, so leave room for it.workflow.json.Email Trigger (IMAP).llama3:8b.http://localhost:11434/api/generate, which is Ollama's own default address. If n8n cannotEmail Trigger (IMAP) watches the inbox. It fires for each unread email and marks it read, which are its ownfrom, subject and textPlain.1. Classify Email (Ollama) posts to Ollama's /api/generate. The prompt gives the sender, the subject and the firstFilter Spam compares the reply with SPAM, ignoring case, and drops the email when they match.2. Draft Reply (Ollama) asks the same model for a concise, friendly reply body, using the first 2000 characters ofPrepare Draft for Review collects four fields: draft_reply, original_from, original_subject (the subject withRe: in front) and category.1. Classify Email (Ollama).2. Draft Reply (Ollama).llama3:8b in both request bodies.substring in both bodies.Prepare Draft for Review to use them.SPAM. or Spam, because it sells something does not equal SPAM,localhost on your computer. If n8n runs in a container, localhost points at that container.http://<ollama-container>:11434.llama3:8b is listed at ollama.com as 4.7GB with an 8K context window. Any other model Ollama lists works if youNOTICE.md 604 B README.md 5 KB workflow.json 5 KB
alchaincyf · Skill
Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…
op7418 · Skill
Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
zarazhangrui · Skill
Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…
iptv-org · Kit
Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…
uwg · Kit
Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…