Automated Email Responder with Human Approval
detail.loadingPreview
Processes incoming emails, generates AI-powered responses, and sends them for human approval before final dispatch.
About This Workflow
This workflow automates the handling of incoming emails. It triggers on new IMAP emails, converts their content to Markdown for better LLM processing, summarizes the email content using a Langchain summarization chain, and then uses a Langchain agent to draft a response based on the summarized content and potentially external knowledge (though the current agent configuration seems to focus on response generation from summarized text). The drafted response is then sent for human review via email. If approved, the final response is sent to the original sender. If not approved, the process stops.
Key Features
- Email Triggering: Automatically processes new emails from an IMAP account.
- Content Conversion: Transforms email HTML content into Markdown for improved LLM understanding.
- Email Summarization: Utilizes a Langchain summarization chain to condense incoming email content.
- AI-Powered Response Generation: Employs a Langchain agent to craft professional and concise email replies.
- Human-in-the-Loop Approval: Forwards drafted responses to a designated email address for human review and approval.
- Conditional Sending: Sends the final response only after explicit human approval.
How To Use
- Email Trigger (IMAP): Configure your IMAP credentials and the inbox to monitor.
- Markdown: This node automatically converts the
textHtmlfrom the IMAP trigger to Markdown. - Email Summarization Chain: This node uses the
OpenAI Chat Model(deepseek-chat in this case) to summarize the content provided by theMarkdownnode. The prompt is set to generate a concise summary. - Write email: This node uses the
OpenAInode (gpt-4o-mini) to generate the email response based on the summarized email. ThesystemMessageguides the AI to be professional, concise, and within a word limit. The prompt is `Write the text to reply to the following email:
{{ $json.response.text }}. Note: $json.response.textis likely referring to the output of theEmail Summarization Chainnode. 5. **Set Email text:** This node takes the output from theWrite emailnode and assigns it to anemailvariable for later use. 6. **Approve Email:** This node sends an email toinfo@n3witalia.comcontaining the original email's HTML and the AI-generated response for human review. It's configured tosendAndWait, meaning the workflow will pause here until a response is received or a timeout occurs (though not explicitly shown in parameters). 7. **Approved?:** This IFnode checks theapprovedfield from theApprove Emailnode's output. Ifapprovedis true: - **Send Email:** The AI-generated email response is sent to the original sender of the incoming email. Ifapproved` is false, the workflow path ends.
Apps Used
Workflow JSON
{
"id": "fee43c9d-7431-4810-95c3-f286c770e808",
"name": "Automated Email Responder with Human Approval",
"nodes": 25,
"category": "Automation",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: fee43c9d-7431...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
Dynamic Prompt Generation from GitHub with Language Model Integration
Fetches prompts from a GitHub repository, substitutes variables, and processes them with an AI agent.
Automated Google Drive Backup for n8n Workflows
Automatically back up n8n workflows to Google Drive on a schedule.
Inventory Slack Alert Workflow
Triggers an alert based on inventory changes, processes data using RAG, and logs results.