Description
n8n-nodes-imap-advanced
Advanced, generic IMAP community nodes for n8n (Mailcow, Dovecot, Gmail IMAP, Outlook IMAP, etc.).
This package is focused on practical email automation patterns that are hard to build with the default n8n email nodes alone:
- message threading from headers (
References,In-Reply-To) - robust flag/tag updates (including custom IMAP keywords)
- optional attachment download as n8n binary data
- trigger with
auto | idle | pollbehavior - Message
- Thread
- Mailbox
- modes:
auto,idle,poll - output formats:
headersSnippet,full,raw - attachment modes:
none,metadataOnly,binary - optional post-processing: mark seen, add flags, move message
- credential type:
imap - no custom IMAP credential is required
—
Included nodes
1) IMAP Advanced
Resource-based action node with these operations:
– get
– search
– updateFlags
– move
– copy
– delete (adds Deleted)
– undelete (removes Deleted)
– expunge
– getByMessage
– list
– status
2) IMAP Advanced Trigger
New message trigger with:
—
Credentials
This package reuses n8n built-in IMAP credentials:
—
Installation
Community package in n8n
Install as a regular npm package where n8n runs:
npm install n8n-nodes-imap-advanced
or from a local tarball:
npm install /path/to/n8n-nodes-imap-advanced-0.1.0.tgz
Then restart n8n.
—
Quick workflow example (thread + attachments)
1. IMAP Advanced Trigger (mode=auto, mailbox=INBOX)
2. IMAP Advanced (resource=thread, operation=getByMessage)
3. loop over thread messages
4. IMAP Advanced (resource=message, operation=get, attachmentsMode=binary)
5. process content / attachments
6. IMAP Advanced (resource=message, operation=updateFlags or move)
—
Threading behavior
Thread:getByMessage strategy:
1. parse References
2. fallback to In-Reply-To
3. optional subject fallback (Subject Fallback = true)
Notes:
—
Attachments behavior
For Message:get and Trigger output:
none: no attachment metadata/contentmetadataOnly: metadata only (filename, mime, size)binary: adds n8n binary fields (attachment0, attachment1, … by default)Attachment filtering options:
—
Flags / tags
IMAP “tags” are flags/keywords:
Seen, Answered, Flagged, Deleted, Draft$n8n_processed, ai-repliedUse Message:updateFlags with:
addremovereplace—
Move behavior
Message:move:
MOVE capability when server supports itCOPY + Deleted + expunge equivalent flow—
Development
npm install
npm run build
—
Current limitations
expunge is mailbox-level in current implementation.—
License
MIT