AutomationFlowsAI & RAG › AI-Powered Gmail Reply Agent

AI-Powered Gmail Reply Agent

Original n8n title: Google

Google. Uses gmailTrigger, agent, lmChatGoogleGemini, gmail. Event-driven trigger; 4 nodes.

Event trigger★★☆☆☆ complexityAI-powered4 nodesGmail TriggerAgentGoogle Gemini ChatGmail
AI & RAG Trigger: Event Nodes: 4 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Google",
  "nodes": [
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "filters": {}
      },
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.3,
      "position": [
        -192,
        -32
      ],
      "id": "b3f02fa8-8424-4d30-bb19-6c8bd8ac0db6",
      "name": "Gmail Trigger",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=You are an Intelligent model who replies to mails in an aggressive manner.\nMail Subject:\n{{ $json.Subject }}\nMail Content:\n{{ $json.snippet }}\n\nJust send the reply in a paragraph not exceeding 50 words.",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.2,
      "position": [
        16,
        -32
      ],
      "id": "bdcc00cc-a924-4e86-b414-0c1e45bc62f9",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "modelName": "models/gemini-2.5-flash-lite",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        -64,
        144
      ],
      "id": "112dcd0a-3011-4c98-999a-1f067854cff1",
      "name": "Google Gemini Chat Model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "sairohith7050@gmail.com",
        "subject": "Testing with n8n",
        "emailType": "text",
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        384,
        -32
      ],
      "id": "31cc3cb6-cdd0-43cc-83a9-194beb07af79",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c0e6ab3b-95cb-476e-b84a-5f803a689ef3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "7d57m4uQEn06HmTE",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Google. Uses gmailTrigger, agent, lmChatGoogleGemini, gmail. Event-driven trigger; 4 nodes.

Source: https://github.com/nxtrohith/abcd-agentic-training-vnr-nxtrohith/blob/1e1f743a20695ff6c2f3a307d6189bf90c47f69a/Automations/Automation.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Welcome to your hands-on guide for building a resilient, intelligent email support system in n8n! This workflow is specifically designed as an educational tool to help you understand advanced AI autom

Agent, Gmail Trigger, Memory Buffer Window +4
AI & RAG

Title Create Google Calendar events from labeled Gmail emails using AI

Google Calendar, Gmail, Gmail Trigger +3
AI & RAG

This template and YouTube video goes over 5 different implementations of evaluations within n8n. Categorization Correctness Tools used String similarity Helpfulness

Evaluation, Evaluation Trigger, Google Gemini Chat +8
AI & RAG

Turn a simple email workflow into a LinkedIn content machine. Generate post ideas, draft full posts, and auto-publish to LinkedIn all controlled by replying to emails.

Agent, Google Gemini Chat, Gmail +3
AI & RAG

This workflow is for hotel managers, travel agencies, and hospitality teams who receive booking requests via email. It eliminates the need for manual data entry by automatically parsing emails and att

Google Sheets, Gmail, Agent +4