Description
n8n-nodes-imap-enhanced
This is an enhanced n8n community node that adds support for Installation
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
* 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)
* 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
text, markdown, and html fields for email body contentnode-html-markdown library for accurate HTML to Markdown conversionMultiple Mailbox Support
Custom Labels Support
labelName:labelValue format (e.g., “Priority:High”)Limit Parameters
Text Search Limitations & Solutions
imap.qiye.aliyun.com) don’t support text-based searches (SUBJECT, BODY, FROM, TO)Output Structure
{
"seq": 415,
"uid": 18718,
"mailboxPath": "INBOX",
"envelope": {
"subject": "Email Subject",
"from": [{"name": "Sender", "address": "sender@example.com"}],
"to": [{"name": "Recipient", "address": "recipient@example.com"}],
"date": "2025-01-XX",
"messageId": ""
},
"labels": ["\Seen"],
"size": 12345,
"text": "Plain text content",
"markdown": "# HeadernnBold text",
"html": "HTML content
"
}
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.