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 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-imap-enhanced

v2.17.10

Published

Enhanced IMAP node with custom labels support, limit parameters, and structured email fields for n8n workflows.

Readme

n8n-nodes-imap-enhanced

This is an enhanced n8n community node that adds support for IMAP email servers with advanced features including multiple mailbox support, custom labels, limit parameters, and professional HTML to Markdown conversion.

Installation

Follow the installation guide in the n8n community nodes documentation.

Use n8n-nodes-imap-enhanced in N8N settings to install the stable version.

To install beta version, use n8n-nodes-imap-enhanced@beta.

NPMJS: n8n-nodes-imap-enhanced

Operations

  • Mailbox
    • Get list of mailboxes (including status information like number of messages) with limit parameter
    • Get status of a mailbox (number of messages, etc.)
    • Create a mailbox
    • Rename a mailbox
    • ~Delete a mailbox~ (disabled due to danger of accidental data loss and no apparent use case)
  • Email
    • Get list of emails from multiple mailboxes with limit parameter and three content formats (text, markdown, html)
    • Get single email from multiple mailboxes with comprehensive content processing
    • Download attachments from an email
    • Move an email to another mailbox
    • Copy an email into another mailbox
    • Set/remove flags on an email ("seen", "answered", "flagged", "deleted", "draft") with custom labels support
    • Manage custom labels (add, remove, set custom labels/keywords)
    • Create email draft in a mailbox
      • Use n8n-nodes-eml node to create complex emails. It supports attachments and other features.

New Features

Professional Content Processing

  • Three Content Formats: Returns text, markdown, and html fields for email body content
  • Professional Markdown: Uses node-html-markdown library for accurate HTML to Markdown conversion
  • Clean Text: Converts HTML to readable plain text with proper formatting
  • Standard Fields: Always includes flags/labels and structured envelope data

Multiple Mailbox Support

  • Multi-Selection: Select multiple mailboxes simultaneously for comprehensive email searches
  • ALL Mailboxes Option: Empty mailbox selection automatically searches ALL available mailboxes
  • Cross-Mailbox Search: Find emails across multiple mailboxes in a single operation
  • Mailbox Tracking: Each email result includes the source mailbox path for better organization

Custom Labels Support

  • Search by Custom Labels: Search emails using custom labels/keywords
  • Label Management: Add, remove, or set custom labels on emails
  • Flexible Format: Support for labelName:labelValue format (e.g., "Priority:High")

Limit Parameters

  • Email List Limit: Control maximum number of emails returned
  • Mailbox List Limit: Control maximum number of mailboxes returned
  • Performance Optimization: Prevents excessive data fetching

Text Search Limitations & Solutions

  • Server Limitations: Some IMAP servers (like Alimail imap.qiye.aliyun.com) don't support text-based searches (SUBJECT, BODY, FROM, TO)
  • Recommended Workaround: Use "Get Many" operation with multiple mailboxes, then filter results locally using n8n's "Filter" node
  • Cross-Mailbox Search: Our multiple mailbox feature is perfect for this - search all mailboxes and filter locally
  • Better Performance: Local filtering gives you more control and works reliably across all IMAP servers

Output Structure

{
  "seq": 415,
  "uid": 18718,
  "mailboxPath": "INBOX",
  "envelope": {
    "subject": "Email Subject",
    "from": [{"name": "Sender", "address": "[email protected]"}],
    "to": [{"name": "Recipient", "address": "[email protected]"}],
    "date": "2025-01-XX",
    "messageId": "<message-id>"
  },
  "labels": ["\\Seen"],
  "size": 12345,
  "text": "Plain text content",
  "markdown": "# Header\n\n**Bold** text",
  "html": "<p>HTML content</p>"
}

Usage Examples

Multiple Mailbox Search

To search for emails across multiple mailboxes:

  1. Search All Mailboxes: Leave the "Mailbox" field empty to search all available mailboxes
  2. Search Specific Mailboxes: Select multiple mailboxes (e.g., INBOX, Sent, Drafts)
  3. Filter Results: Use n8n's "Filter" node to search for specific text content

Text Search Workaround

For IMAP servers that don't support text-based searches (like Alimail):

  1. Use "Get Many" operation with empty mailbox selection (searches all mailboxes)
  2. Add a "Filter" node after the IMAP node
  3. Configure the filter to search in email fields like envelope.subject, textContent, htmlContent, etc.

Example filter expression:

{{ $json.envelope.subject.includes("Mary") || $json.textContent.includes("Mary") }}

Credentials

Currently, this node supports only basic authentication (username and password).
OAuth2 authentication is not supported yet.

NOTE: You can reuse core N8N IMAP Trigger node credentials for this node.