What This Workflow Does
This automation solves the common problem of important emails getting lost in crowded inboxes or requiring manual copying into knowledge management systems. It automatically processes incoming emails through multiple validation and transformation steps before storing them in Notion as organized, searchable knowledge.
The workflow checks for duplicates using Postgres to maintain data quality, normalizes content into consistent formats, and sends Telegram alerts when new entries are added. This creates a self-maintaining knowledge repository that grows automatically as your team receives relevant information via email.
How It Works
1. Email Retrieval via IMAP
The workflow connects to your email server via IMAP and scans specified folders for new messages. You can configure filters to only process emails matching certain criteria (sender, subject keywords, labels, etc.).
2. Content Extraction & Normalization
Each email's content is cleaned and converted to plain text. Key elements like subject, sender, date, and body text are extracted and formatted into standardized fields for consistent knowledge base entries.
3. Duplicate Checking in Postgres
Before creating a new entry, the system checks your Postgres database for potential duplicates using multiple matching criteria. This prevents redundant information from cluttering your knowledge base.
4. Notion Database Creation
Validated and deduplicated content gets added to your Notion knowledge base as a new database entry. The workflow maintains consistent formatting and includes all relevant metadata for easy searching.
5. Telegram Notification
A Telegram alert is sent to specified channels or individuals whenever a new entry is added to Notion. This keeps your team informed about important knowledge additions in real-time.
Who This Is For
This workflow benefits any team that needs to systematically capture and organize email-based knowledge:
- Customer support teams documenting solutions
- Research teams collecting findings
- HR departments maintaining policy references
- Executive assistants tracking meeting notes
- Remote teams sharing updates and resources
What You'll Need
- An n8n instance (cloud or self-hosted)
- IMAP-enabled email account
- Postgres database (can be hosted anywhere)
- Notion account with API access
- Telegram bot token and channel ID
Pro tip: Create a dedicated email folder or label for knowledge base candidates to improve filtering accuracy.
Quick Setup Guide
- Download the JSON template file
- Import into your n8n instance
- Configure IMAP connection details
- Set up Postgres database credentials
- Connect your Notion integration
- Add Telegram bot credentials
- Test with sample emails
- Activate the workflow
Key Benefits
Saves 5-10 hours per week by eliminating manual email copying and organization. The automation handles repetitive tasks consistently without fatigue.
Reduces duplicate knowledge entries by 80-90% through Postgres-based deduplication. This keeps your knowledge base clean and search results relevant.
Improves information accessibility by making email content searchable in Notion alongside other knowledge resources.
Accelerates team onboarding by automatically capturing institutional knowledge that would otherwise remain trapped in individual inboxes.