1. What This Automation Does
This workflow catches new emails from your inbox, turns them into easy text, and makes short quick summaries.
It then looks up important info from your company documents to help write smart replies.
The system writes professional email drafts, checks if a person says “send” or “change”, and improves messages if needed.
Finally, it sends out the emails back to the senders all by itself.
This saves a lot of time by doing email reading, writing, and sending automatically.
2. Who Should Use This Workflow
People who get many detailed business emails every day can use this.
It helps managers or anyone who needs fast and good email replies.
No deep tech skills needed, but some basic n8n know-how helps to setup.
3. Tools and Services Used
- IMAP Email Account: Watches for new incoming emails.
- SMTP Email Account: Sends the replies out.
- OpenAI API: Summarizes emails and writes reply drafts.
- Qdrant Vector Database API: Finds related company documents for smart answers.
- Google Drive Account (optional): Stores company documents used for learning.
- DeepSeek API: Helps AI chat and response generation.
- Gmail Account with OAuth2: Used for sending approval emails and waiting feedback.
4. Beginner Step-by-Step: How to Use This Workflow in n8n
Downloading and Importing Workflow
- Download the workflow file using the Download button on this page.
- Inside your n8n editor, click on the menu and choose “Import from File”.
- Select the downloaded file to load the workflow.
Configure Credentials and Settings
- Fill in your IMAP email credentials in the Email Trigger (IMAP) node.
- Provide SMTP details for the Send Email node to send emails.
- Add your OpenAI API key in the relevant LangChain nodes for summarization and email writing.
- Set your Qdrant collection ID in the vector store node.
- Update any emails or folders if your setup uses different addresses or storage.
- Enter your Gmail OAuth2 credentials in the Gmail nodes if you use approval flows.
Testing and Activation
- Run a test by sending an email to your IMAP account and watch the workflow start.
- Check the generated reply drafts and flow behavior.
- Once happy, activate the workflow in n8n to run automatically.
Follow this simple process to start using the workflow fast and safely.
5. Inputs → Processing → Output
Inputs
- Incoming emails received through IMAP trigger.
Processing Steps
- Convert email HTML to Markdown for easier text handling.
- Create short summaries of email contents with OpenAI.
- Search company info in Qdrant using the summaries.
- Generate reply email text using LangChain agents.
- Classify human feedback as Approved or Declined.
- Review and update drafts based on feedback.
Output
- Send polished, professional emails back to original senders using SMTP or Gmail nodes.
6. Common Issues and Fixes
- IMAP node not triggering: Double-check email server, username, and password.
- Emails stuck in Gmail node: Renew Gmail OAuth token and check permissions.
- Empty summarization result: Confirm that email HTML converts correctly to Markdown.
7. Customization Ideas
- Change email credentials to fit your company.
- Adjust summarization word limit as preferred in the summarizer prompt.
- Add more or different documents to Qdrant to improve replies.
- Modify feedback categories in Text Classifier for more detailed review steps.
- Swap OpenAI GPT models with other LLMs supported in n8n.
8. Pre-Production Checklist
- Test IMAP and SMTP connections.
- Load sample documents and test vector retrieval.
- Send test emails with various lengths.
- Review final email formatting especially HTML output.
- Backup the workflow and credentials.
9. Deployment Guide
Activate the workflow inside your n8n editor after config and testing.
Use manual triggers first to confirm behavior.
Monitor error logs regularly after going live.
Add alert nodes if needed for failure notifications.
Consider running self-host n8n for full control on production systems.
10. Summary
✓ Automatically reads and summarizes incoming emails.
✓ Searches company documents to make answers smart and correct.
✓ Writes professional reply drafts and waits for human approval.
✓ Revises and sends polished emails without manual typing.
→ Saves many hours daily on email handling.
→ Helps keep replies clear, quick, and consistent.
