Package Information
Documentation
š¤ n8n-nodes-imap-ai
AI-Agent Ready IMAP Node for n8n with Enhanced Automation Capabilities & AI Tool Support
This is an advanced, AI-agent optimized IMAP node for n8n that provides comprehensive email and mailbox management with intelligent $fromAI()
integration and full AI Tool support for n8n AI Agents.
š Built upon the excellent foundation of n8n-nodes-imap by Vasily Maslyukov
š Features
š¤ NEW: AI Tool Support
Full compatibility with n8n AI Agents as intelligent tools!
- ā
usableAsTool: true
- Automatically available as AI Agent Tool - ā
aiEnabled: true
- Enhanced AI integration - ā
Two Node Variants:
- IMAP AI: Classic node with
$fromAI()
support - IMAP Tool: Optimized for AI Agent tool usage
- IMAP AI: Classic node with
- ā Intelligent Parameter Descriptions: AI-friendly field explanations for tool usage
- ā Auto-Discovery: AI Agents can automatically discover and use IMAP operations
ā Complete Email Operations (7 AI-Ready Operations)
- EmailGetList: Intelligent email search with AI-generated queries
- EmailSetFlags: AI-driven flag management with bulk operations
- EmailMove: Smart email organization and routing
- EmailDownload: AI-controlled email archiving with flexible output
- EmailCopy: Intelligent email duplication and backup
- EmailDownloadAttachment: Automatic attachment management
- EmailCreateDraft: AI-based draft creation with intelligent content
ā Complete Mailbox Operations (8 AI-Ready Operations)
- MailboxCreate: Intelligent folder creation with AI parameters
- MailboxDelete: AI-safe deletion with mandatory confirmation
- MailboxGetList: Enhanced folder analysis with statistics
- MailboxGetQuota: Intelligent storage monitoring with analytics
- MailboxGetStatus: Advanced folder monitoring with activity metrics
- MailboxRename: AI-driven folder standardization
- MailboxSubscribe: Intelligent folder visibility management
- MailboxMove: Advanced folder reorganization and hierarchy restructuring
š AI-Agent Integration
š§ Using as AI Tool
AI Agents can automatically discover and use the IMAP Tool node for:
- š§ Automated Email Processing: AI agents can read, search, and organize emails
- šļø Intelligent Folder Management: Create, rename, and organize mailbox folders
- š Smart Email Search: AI-driven email discovery and filtering
- š Email Analytics: Get mailbox statistics and quota information
- š·ļø Flag Management: Automatically mark emails as read, important, etc.
Example AI Agent Usage:
AI Agent: "Check my inbox for urgent emails from the last 24 hours"
ā Uses IMAP Tool with EmailGetList operation
ā Automatically applies search criteria and time filters
ā Returns structured email data for further processing
š” Traditional $fromAI() Integration
Every operation includes $fromAI()
integration for manual AI-agent automation:
// Example: AI-driven email search
{
"searchQuery": "={{ $fromAI('search_query', 'Email search criteria') }}",
"mailboxPath": "={{ $fromAI('target_folder', 'Mailbox to search in') }}"
}
Enhanced Features for AI Workflows:
- Intelligent Parameter Descriptions: AI-friendly field explanations
- Enhanced Metadata: Rich response data for AI decision-making
- Safety Mechanisms: Confirmation requirements for destructive operations
- Bulk Operations: Efficient mass email processing
- Error Handling: Clear error messages for AI debugging
š¦ Installation
Via n8n Community Nodes
- Open your n8n instance
- Go to Settings ā Community Nodes
- Install:
n8n-nodes-imap-ai
- Restart n8n
Via npm
npm install n8n-nodes-imap-ai
š§ Configuration
Create IMAP Credentials:
- Host: Your IMAP server (e.g.,
imap.gmail.com
) - Port: Usually
993
for SSL - Username: Your email address
- Password: Your email password or app-specific password
- SSL: Enable for secure connection
- Host: Your IMAP server (e.g.,
Use in Workflows:
- Add "IMAP AI" node to your workflow
- Select your IMAP credentials
- Choose operation (Email or Mailbox)
- Configure AI-enhanced parameters
š¤ AI-Agent Examples
Smart Email Organization
// AI automatically categorizes and moves emails
{
"operation": "move",
"emailIds": "={{ $fromAI('email_ids', 'IDs of emails to organize') }}",
"targetFolder": "={{ $fromAI('target_folder', 'Destination folder based on email content') }}"
}
Intelligent Folder Management
// AI creates folders based on email patterns
{
"operation": "createMailbox",
"mailboxName": "={{ $fromAI('folder_name', 'Folder name based on email categorization') }}",
"topLevelMailbox": "={{ $fromAI('is_top_level', 'Whether to create as top-level folder') }}"
}
Automated Cleanup
// AI identifies and archives old emails
{
"operation": "downloadAndArchive",
"searchCriteria": "={{ $fromAI('cleanup_criteria', 'Criteria for emails to archive') }}",
"outputFormat": "eml"
}
š Use Cases
- Email Automation: Automated email processing and routing
- Content Analysis: AI-driven email categorization and insights
- Backup & Archiving: Intelligent email backup strategies
- Cleanup Operations: Smart mailbox maintenance and organization
- Integration Workflows: Connect email data with other systems
š”ļø Security Features
- Safe Deletion: Mandatory confirmation for destructive operations
- Credential Protection: Secure IMAP authentication
- Error Handling: Comprehensive error reporting
- Audit Trail: Enhanced logging for operations
š Acknowledgments
This project is built upon the excellent foundation of the original n8n-nodes-imap by Vasily Maslyukov.
What's New in the AI-Enhanced Version:
- ā
Complete
$fromAI()
integration across all 15 operations - ā 2 new mailbox operations (MailboxSubscribe, MailboxMove)
- ā Enhanced metadata for AI decision-making
- ā Improved safety mechanisms and error handling
- ā AI-friendly parameter descriptions and placeholders
- ā Modular architecture with shared utilities
Original Project:
- Original Author: Vasily Maslyukov
- Original Repository: n8n-nodes-imap
- Original npm Package: n8n-nodes-imap
š Links
- This Repository: GitHub
- npm Package: n8n-nodes-imap-ai
- Original Project: n8n-nodes-imap
- Author: Niko Terschawetz
š License
MIT License - See LICENSE file for details.
š¤ Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Made with ā¤ļø for the n8n and AI automation community
Special thanks to Vasily Maslyukov for the original foundation! š