Skip to main content

Human in the loop email response system (AI + IMAP)

Workflow preview

Workflow preview
100%
Human in the loop email response system (AI + IMAP) preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow automates the process of handling incoming emails by: 1. Receiving emails via IMAP. 2. Converting the email to Markdown for better AI understanding. 3. Summarizing the em...

Best for

  • AI automation workflows
  • Lead Nurturing automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.emailreadimap, n8n-nodes-base.markdown, n8n-nodes-base.emailsend, @n8n/n8n-nodes-langchain.chainsummarization, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.stickynote, n8n-nodes-base.set

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Yatharth Chauhan.

Original n8n.io source

1.1 Workflow description

Title
Human in the loop email response system (AI + IMAP)
Workflow name
Human in the loop email response system (AI + IMAP)

How it works

This workflow automates the process of handling incoming emails by:

  1. Receiving emails via IMAP.
  2. Converting the email to Markdown for better AI understanding.
  3. Summarizing the email using an AI model.
  4. Drafting a professional reply with AI, based on the summary.
  5. Requesting human approval for the AI-generated response.
  6. Sending the approved reply back to the original sender.

Set up steps

Estimated time: 10โ€“20 minutes (excluding credential setup) What youโ€™ll need:

  • IMAP credentials for your email inbox
  • SMTP credentials for sending emails
  • OpenAI (or compatible) API key for AI steps

Setup outline:

  1. Add your IMAP and SMTP credentials to the workflow.
  2. Connect your OpenAI (or compatible) account for AI summarization and reply generation.
  3. Deploy the workflow in n8n and activate it.
  4. Test by sending an email to your connected inbox.

Note: Detailed configuration tips and explanations are included as sticky notes inside the workflow for each step.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Email Trigger (IMAP)

Type / Role
n8n-nodes-base.emailReadImap - emailReadImap
Config choices
Version 2

Block 2 - Markdown

Type / Role
n8n-nodes-base.markdown - markdown
Config choices
Version 1

Block 3 - Send Email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 4 - Email Summarization Chain

Type / Role
@n8n/n8n-nodes-langchain.chainSummarization - chainSummarization
Config choices
Version 2

Block 5 - Write email

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 6 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 7 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Approve Email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 12 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 13 - Set Email text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note11

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Approved?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

3. Summary Table

Workflow Human in the loop email response system (AI + IMAP)
Complexity advanced
Nodes 16
Categories AI, Lead Nurturing
Author Yatharth Chauhan
Published 17 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6082/6082.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Human in the loop email response system (AI + IMAP) do?

How it works This workflow automates the process of handling incoming emails by: 1. Receiving emails via IMAP. 2. Converting the email to Markdown for better AI understanding. 3. Summarizing the em...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your AI, Lead Nurturing use case.