Skip to main content

Gmail AI Auto-Responder: Create Draft Replies to incoming emails

Workflow preview

Workflow preview
100%
Gmail AI Auto-Responder: Create Draft Replies to incoming emails preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This workflow automatically generates draft replies in Gmail. It's designed for anyone who manages a high volume of emails or often face writer's block when crafting responses. Since it doesn't sen...

Best for

  • Ticket Management automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.outputparserstructured, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.stickynote, n8n-nodes-base.gmail, @n8n/n8n-nodes-langchain.chainllm

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Gmail AI Auto-Responder: Create Draft Replies to incoming emails
Workflow name
Gmail AI Auto-Responder: Create Draft Replies to incoming emails

This workflow automatically generates draft replies in Gmail. It's designed for anyone who manages a high volume of emails or often face writer's block when crafting responses. Since it doesn't send the generated message directly, you're still in charge of editing and approving emails before they go out.

How It Works:

  • Email Trigger: activates when new emails reach the Gmail inbox
  • Assessment: uses OpenAI gpt-4o and a JSON parser to determine if a response is necessary.
  • Reply Generation: crafts a reply with OpenAI GPT-4 Turbo
  • Draft Integration: after converting the text to html, it places the draft into the Gmail thread as a reply to the first message

Set Up Overview (~10 minutes):

  • OAuth Configuration (follow n8n instructions here):
    • Setup Google OAuth in Google Cloud console. Make sure to add Gmail API with the modify scope.
    • Add Google OAuth credentials in n8n. Make sure to add the n8n redirect URI to the Google Cloud Console consent screen settings.
  • OpenAI Configuration: add OpenAI API Key in the credentials
  • Tweaking the prompt: edit the system prompt in the "Generate email reply" node to suit your needs

Detailed Walkthrough

Check out this blog post where I go into more details on how I built this workflow.

Reach out to me here if you need help building automations for your business.

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 - Gmail Trigger

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

Block 2 - If Needs Reply

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

Block 3 - JSON Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1

Block 4 - OpenAI Chat

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

Block 5 - Sticky Note

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

Block 6 - Sticky Note1

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

Block 7 - Sticky Note2

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

Block 8 - Sticky Note3

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

Block 9 - OpenAI Chat Model

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

Block 10 - Gmail - Create Draft

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

Block 11 - Assess if message needs a reply

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.3

Block 12 - Generate email reply

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.4

3. Summary Table

Workflow Gmail AI Auto-Responder: Create Draft Replies to incoming emails
Complexity intermediate
Nodes 12
Categories Ticket Management, Multimodal AI
Author Nicolas Chourrout
Published 19 May 2024

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/2271/2271.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 Gmail AI Auto-Responder: Create Draft Replies to incoming emails do?

This workflow automatically generates draft replies in Gmail. It's designed for anyone who manages a high volume of emails or often face writer's block when crafting responses. Since it doesn't sen...

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 Ticket Management, Multimodal AI use case.