// free agents / inbox-summariser
📬 Inbox summariser
“Every morning, summarise my unread emails and tell me which ones need a reply.”
Free, no sign-up. MIT licence. Python standard library only, so there's nothing to pip install.
What it does
Reads your unread emails from the last 24 hours over IMAP (Gmail, Outlook, Fastmail, iCloud...) without marking them as read, splits people from newsletters, optionally asks an AI to flag what needs a reply, and emails or prints the summary.
What you need
- Python 3.9+ (no extra packages), or n8n with a Gmail credential
- IMAP access to your mailbox (Gmail/Outlook: turn on 2-step verification and create an app password)
- Optional: an OpenAI-compatible API key for 'needs a reply' detection
5-minute setup
Python
- Install Python 3.9+ and unzip the download.
- Try it with no accounts:
python3 inbox_summariser.py --eml-dir sample_emails --dry-run - Copy
.env.exampleto.envand fill it in. - Run:
set -a; . ./.env; set +a; python3 inbox_summariser.py(Windows steps in the README).
n8n (no code)
- Workflows, then Import from file, then
inbox-summariser.n8n.json. - Follow the yellow “Read me” note (credentials or webhook).
- Test workflow, then switch it to Active.
Run it on a schedule
Every day at 08:00 with cron:
0 8 * * * cd /path/to/inbox-summariser && set -a && . ./.env && set +a && python3 inbox_summariser.py >> run.log 2>&1On Windows use Task Scheduler. With n8n, the Schedule node does it for you.
Settings
| Variable | What it does |
|---|---|
IMAP_HOST / IMAP_USER / IMAP_PASSWORD | e.g. imap.gmail.com / you@gmail.com / your app password |
IMAP_FOLDER | Default INBOX |
HOURS | Default 24 |
SMTP_HOST, EMAIL_TO | Optional: email the summary (reuses your IMAP login by default) |
OPENAI_API_KEY / OPENAI_BASE_URL / OPENAI_MODEL | Optional AI summary |
What we tested
- Ran on the included sample emails: people and newsletters split correctly, HTML emails converted to text.
- Ran through a fake IMAP server: confirmed the folder is opened read-only and emails are fetched with BODY.PEEK (never marked read).
- AI and SMTP paths tested with mocks.
- n8n (Gmail) workflow imported into a real n8n install. We didn't run it, because it needs your Gmail login.
Honest limits
- We didn't connect to a real mailbox; that needs your login.
- Your email text goes to the AI provider if you set an API key. Leave it unset to keep everything local.
- The newsletter detection is a simple heuristic (List-Unsubscribe header, no-reply senders).
Want one built for your task?
Describe it in one sentence. We build it, test it and hand it over, usually within 24h.