Skip to main content

Automate Gmail tasks with Gemini AI assistant and contact management

Workflow preview

Workflow preview
100%
Automate Gmail tasks with Gemini AI assistant and contact management preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Use cases are many: Automate Gmail tasks such as sending, replying, labeling, deleting, and fetching emails — all with AI assistance. Perfect for YouTubers managing viewer emails, sales teams handl...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.gmailtool, n8n-nodes-base.googlesheetstool, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.memorybufferwindow, 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 Rakin Jakaria.

Original n8n.io source

1.1 Workflow description

Title
Automate Gmail tasks with Gemini AI assistant and contact management
Workflow name
Automate Gmail tasks with Gemini AI assistant and contact management

Use cases are many: Automate Gmail tasks such as sending, replying, labeling, deleting, and fetching emails — all with AI assistance. Perfect for YouTubers managing viewer emails, sales teams handling inquiries, freelancers responding to client requests, or professionals keeping their inbox organized.


Good to know

At time of writing, each Gemini request is billed per token. See Gemini Pricing for updated details. The workflow uses Gmail labels (e.g., youtube-viewers, sales-inquiry, meeting-request, potential-clients, collaboration-requests) for classification — make sure these exist in your Gmail account.


How it works

  • Chat Trigger: You interact with the agent via a chat interface (webhook).
  • AI Agent: Gemini-powered assistant interprets your instructions (send, reply, label, delete, fetch emails).
  • Email Actions: Based on your request, the assistant uses Gmail tools to act on emails (Send, Reply, Label, Delete, Get Many).
  • Contact Lookup: If only a name is provided, the agent checks Google Sheets for the matching email address. If not found, it prompts you to add it.
  • Memory: A buffer memory stores chat context so the assistant can maintain continuity across multiple interactions.
  • Labeling: Emails can be auto-labeled for better organization (e.g., client inquiries, meeting requests).

How to use

  • Send commands like: “Reply to John’s email with a follow-up about the project.” “Label Sarah’s email as potential-client.” “Delete the latest spam email.”
  • The Gmail Agent will handle the request instantly and keep everything logged properly.

Requirements

  • Gmail account connected with OAuth2 credentials
  • Google Gemini API key for AI processing
  • Google Sheets for contact management
  • Pre-created Gmail labels for organization

Customising this workflow

  • Add new Gmail labels for your workflow (e.g., Invoices, Support Tickets).
  • Connect to a CRM (e.g., HubSpot, Notion, or Airtable) for syncing email data.
  • Enhance AI replies with dynamic templates stored in Google Sheets.
  • Extend chat commands to include batch actions (e.g., “Archive all emails older than 30 days”).

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 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.1

Block 2 - AI Agent

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

Block 3 - Send

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

Block 4 - Reply

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

Block 5 - Label

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

Block 6 - Delete

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

Block 7 - Get Many

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

Block 8 - Sheet

Type / Role
n8n-nodes-base.googleSheetsTool - googleSheetsTool
Config choices
Version 4.6

Block 9 - Gemini

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

Block 10 - Memory

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

Block 11 - Sticky Note

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

Block 12 - Sticky Note3

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

3. Summary Table

Workflow Automate Gmail tasks with Gemini AI assistant and contact management
Complexity intermediate
Nodes 12
Categories AI Chatbot, Multimodal AI
Author Rakin Jakaria
Published 26 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7902/7902.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 Automate Gmail tasks with Gemini AI assistant and contact management do?

Use cases are many: Automate Gmail tasks such as sending, replying, labeling, deleting, and fetching emails — all with AI assistance. Perfect for YouTubers managing viewer emails, sales teams handl...

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