npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-imap-advanced

v0.2.0

Published

n8n community nodes for advanced generic IMAP workflows

Downloads

1,123

Readme

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 | poll behavior

Included nodes

1) IMAP Advanced

Resource-based action node with these operations:

  • Message
    • get
    • search
    • updateFlags
    • move
    • copy
    • delete (adds \Deleted)
    • undelete (removes \Deleted)
    • expunge
  • Thread
    • getByMessage
  • Mailbox
    • list
    • status

2) IMAP Advanced Trigger

New message trigger with:

  • modes: auto, idle, poll
  • output formats: headersSnippet, full, raw
  • attachment modes: none, metadataOnly, binary
  • optional post-processing: mark seen, add flags, move message

Credentials

This package reuses n8n built-in IMAP credentials:

  • credential type: imap
  • no custom IMAP credential is required

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:

  • IMAP has no universal thread API like Gmail API.
  • Header-based threading is best effort and may vary across servers/mailboxes.

Attachments behavior

For Message:get and Trigger output:

  • none: no attachment metadata/content
  • metadataOnly: metadata only (filename, mime, size)
  • binary: adds n8n binary fields (attachment_0, attachment_1, ... by default)

Attachment filtering options:

  • max size (MB)
  • allowed MIME list (CSV)
  • filename regex

Flags / tags

IMAP “tags” are flags/keywords:

  • system flags: \Seen, \Answered, \Flagged, \Deleted, \Draft
  • custom keywords: e.g. $n8n_processed, ai-replied

Use Message:updateFlags with:

  • add
  • remove
  • replace

Move behavior

Message:move:

  • uses IMAP MOVE capability when server supports it
  • otherwise falls back to COPY + \Deleted + expunge equivalent flow

Development

npm install
npm run build

Current limitations

  • expunge is mailbox-level in current implementation.
  • Threading is single-mailbox oriented.
  • IDLE mode includes practical polling safety to remain robust across server behaviors.

License

MIT