Email AI Assistant - DeepSeek Integration
An intelligent email analysis assistant based on Node-RED, utilizing DeepSeek AI API for email content analysis and reply suggestions.
๐ Node-RED Official Flow Library: This project has been uploaded to the Node-RED official flow library. You can import and use it directly: https://flows.nodered.org/flow/ad230f600644964156ffb18db2f16ade
๐ฆ npm Package: This project has been published as an npm package. You can install and use it directly: node-red-contrib-email-analysis-deepseek
๐ธ Project Preview
Complete System Interface
Main Interface
๐ Features
- Intelligent Email Analysis: Automatically analyzes email content and extracts key information
- Intent Recognition: Quickly understands the sender's real intent and needs
- Reply Suggestions: Provides professional and targeted reply recommendations
- Real-time Monitoring: Automatically monitors IMAP email accounts and processes new emails in real-time
- History Tracking: Saves email analysis history for easy review
- Web Interface: Modern web dashboard for intuitive display of analysis results
- Multilingual Support: Supports both Chinese and English versions, with Chinese version outputting analysis results in Chinese and English version outputting in English
๐ Quick Start
Method 0: Use GitHub Codespaces (Easiest - No Local Installation!)
๐ New! This project is fully configured for GitHub Codespaces. Use it directly in your browser!
- Click the green "Code" button on GitHub
- Select "Codespaces" tab
- Click "Create codespace on main"
- Wait for environment setup (1-2 minutes)
- Edit
.envfile and add your API keys - Run
./start-nodered.shto start Node-RED - Access Node-RED at the forwarded port 1880
๐ Detailed guide: See CODESPACES.md for complete instructions.
Method 1: Install npm Package (Simplest)
cd ~/.node-red npm install node-red-contrib-email-analysis-deepseek
After restarting Node-RED, find the "Email Analysis DeepSeek" node in the node palette and drag it into your flow to use.
Node-RED Flow Example
Method 2: Import from Node-RED Official Flow Library
- Visit Node-RED Official Flow Library
- Click "Copy JSON" to copy the flow code
- Import the flow in Node-RED (Ctrl+I โ Import from Clipboard)
- Configure API keys and email authentication according to SETUP.md
- Deploy and access the web interface
Method 3: Import from Project Files
- Clone or download this project
- Complete environment configuration according to SETUP.md setup guide
- Import flow files from the
flows/directory into Node-RED - Configure API keys and email authentication
- Deploy and access the web interface
๐ Project Structure
email-analysis-deepseek/
โโโ flows/
โ โโโ flow-english.json # English version Node-RED flow
โ โโโ flow-chinese.json # Chinese version Node-RED flow
โโโ README.md # Project documentation
โโโ SETUP.md # Configuration guide
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
โโโ noderedGraphics/ # Project screenshots
โโโ nodered-flow.png
โโโ noderedFlowLibrary.png
โโโ website-UI-3.jpg
โโโ WholePage.png
๐ ๏ธ Technology Stack
- Node-RED: Flow orchestration and automation platform
- DeepSeek API: AI analysis and content generation
- IMAP: Email receiving protocol
- HTML/CSS/JavaScript: Web interface
- Node.js: Runtime environment
๐ Main Components
1. Email Monitoring Module
- Uses IMAP protocol to monitor Gmail accounts
- Supports OAuth2 authentication
- Automatically detects new emails
2. AI Analysis Module
- Integrates DeepSeek Chat API
- Intelligent analysis of email content and intent
- Extracts key information and action recommendations
3. Data Processing Module
- Saves analysis history records
- Generates notification data
- Manages statistical information
4. Web Interface Module
- Modern dashboard design
- Real-time data display
- Notification management functionality
๐ฏ Core Features
Email Analysis Workflow
- Email Reception: IMAP listener automatically receives new emails
- Content Extraction: Extracts key information such as sender, subject, content
- AI Analysis: Uses DeepSeek API for intelligent analysis
- Result Processing: Parses AI responses, extracts intent, key information, and action recommendations
- Data Storage: Saves analysis results and history records
- Notification Generation: Creates web notification data
Analysis Dimensions
- Intent Analysis: Identifies the real purpose of emails and sender needs
- Key Information: Extracts important information such as time, location, people
- Action Recommendations: Provides specific reply suggestions and follow-up actions
๐ Web Interface Features
- Real-time Monitoring: Displays latest email analysis results
- History Viewing: Browse past analysis records
- Statistics: Shows processing counts and trends
- Notification Management: Delete and clear notification functionality
Interface Preview
๐ Data Management
History Records
- Automatically saves email analysis history
- Configurable retention count (default: 30 records)
- Includes complete analysis results and metadata
Notification System
- Real-time email notification generation
- Supports batch management operations
- Automatic cleanup of expired notifications
๐ง Configuration Requirements
Required Configuration
- DeepSeek API key
- Gmail OAuth2 authentication
- Node-RED environment
Optional Configuration
- History record retention count
- Notification cleanup strategy
- Analysis parameter tuning
๐ Performance Features
- Efficient Processing: Optimized API calls and data processing
- Error Handling: Comprehensive exception handling and fallback mechanisms
- Resource Management: Automatic cleanup and memory optimization
- Scalability: Modular design for easy extension
๐ Security Considerations
- Secure API key storage
- OAuth2 secure authentication
- Sensitive information sanitization
- Input validation and filtering
๐ Use Cases
- Business Email Processing: Quickly understand customer needs and reply suggestions
- Email Classification: Automatically identify email importance and urgency
- Reply Assistant: Provide professional reply templates and suggestions
- Email Monitoring: Real-time monitoring of important emails and notifications
๐ค Contributing
Welcome to submit Issues and Pull Requests to improve the project.
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.
Note: Please ensure all required API keys and authentication information are properly configured before use. For detailed configuration steps, please refer to SETUP.md.


