Skip to main content

Gmail auto-reply generator with ChatGPT

Workflow preview

Workflow preview
100%
Gmail auto-reply generator with ChatGPT 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 contains community nodes that are only compatible with the self hosted version of n8n. Gmail Auto Reply with AI Automatically draft smart email replies using ChatGPT. Reclaim your tim...

Best for

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

Tools used

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

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Matt Chong | n8n Creator.

Original n8n.io source

1.1 Workflow description

Title
Gmail auto-reply generator with ChatGPT
Workflow name
Gmail auto-reply generator with ChatGPT

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Gmail Auto-Reply with AI

Automatically draft smart email replies using ChatGPT. Reclaim your time typing the same responses again and again.


Who is this for?

If you're overwhelmed with emails and constantly repeating yourself in replies, this workflow is for you.

Whether you're a freelancer, business owner, or team lead, it saves you time by handling email triage and drafting replies for you.


What does it solve?

This workflow reads your unread Gmail messages and uses AI to:

  • Decide whether the email needs a response
  • Automatically draft a short, polite reply when appropriate
  • Skip spam, newsletters, or irrelevant emails
  • Save the AI-generated reply as a Gmail draft (you can edit it before sending)

It takes email fatigue off your plate and keeps your inbox moving.


How it works

  1. Trigger on New Email: Watches your Gmail inbox for unread messages.
  2. AI Agent Review: Analyzes the content to decide if a reply is needed.
  3. OpenAI ChatGPT: Drafts a short, polite reply (under 120 words).
  4. Create Gmail Draft: Saves the response as a draft for you to review.
  5. Label It: Applies a custom label like Action so you can easily find AI-handled emails.

How to set up?

  1. Connect credentials:

    • Gmail (OAuth2)
    • OpenAI (API key)
  2. Create the Gmail label:

    • In your Gmail, create a label named Action (case-sensitive).

How to customize this workflow to your needs

  • Change the AI prompt: Add company tone, extra context, or different reply rules.
  • Label more intelligently: Add conditions or labels for “Newsletter,” “Meeting,” etc.
  • Adjust frequency: Change how often the Gmail Trigger polls your inbox.
  • Add manual review: Route drafts to a team member before sending.

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 - Trigger on New Email

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

Block 2 - Get Unread Email

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

Block 3 - Get Required Fields

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

Block 4 - AI Agent

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

Block 5 - OpenAI

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

Block 6 - Structured Output

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

Block 7 - Can AI Agent Respond?

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

Block 8 - Create a draft

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

Block 9 - Label Email As "Action"

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

Block 10 - Sticky Note

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

Block 11 - Sticky Note1

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

3. Summary Table

Workflow Gmail auto-reply generator with ChatGPT
Complexity intermediate
Nodes 11
Categories Multimodal AI
Author Matt Chong | n8n Creator
Published 17 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7513/7513.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 auto-reply generator with ChatGPT do?

This workflow contains community nodes that are only compatible with the self hosted version of n8n. Gmail Auto Reply with AI Automatically draft smart email replies using ChatGPT. Reclaim your tim...

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