Skip to main content

Gmail assistant with Google Gemini classification & Telegram notifications

Workflow preview

Workflow preview
100%
Gmail assistant with Google Gemini classification & Telegram notifications preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Who's it for This template is designed for professionals, entrepreneurs, and busy individuals who receive high volumes of emails and want to automate their email management. Perfect for freelancers...

Best for

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

Tools used

n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.telegram, n8n-nodes-base.gmail, n8n-nodes-base.scheduletrigger, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.noop

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Gmail assistant with Google Gemini classification & Telegram notifications
Workflow name
Gmail assistant with Google Gemini classification & Telegram notifications

Who's it for

This template is designed for professionals, entrepreneurs, and busy individuals who receive high volumes of emails and want to automate their email management. Perfect for freelancers, small business owners, project managers, and anyone who struggles with email overload and wants AI-powered assistance for prioritizing and responding to messages.

How it works

The workflow creates an intelligent email processing system that monitors your Gmail inbox in real-time and categorizes every incoming email using Google Gemini AI. Here's what happens:

Real-time Processing: Every minute, the system checks for new emails and uses AI to classify them into three categories:

  • Category 0 (Needs Reply): Questions, meeting requests, urgent business matters
  • Category 1 (Important Notifications): Bills, confirmations, system alerts, order updates
  • Category 2 (Spam/Unimportant): Marketing emails, newsletters, promotional content

Smart Response Generation: For emails requiring replies, AI generates professional responses and sends them to your Telegram for approval. Once approved, the reply is automatically sent from your Gmail account.

Instant Notifications: Important emails get summarized and sent as quick Telegram notifications so you stay informed without checking email constantly.

Daily Email Digest: Every morning at 8 AM, you receive a comprehensive summary of the previous day's emails, including action items, issues requiring attention, and follow-up tasks.

How to set up

Step 1: Gmail Configuration

  • Connect your Gmail account using OAuth2 authentication
  • Ensure Gmail API access is enabled in your Google Cloud Console

Step 2: Telegram Setup

  • Create a new Telegram bot using @BotFather
  • Get your bot token and personal chat ID
  • Configure the Telegram credentials in n8n

Step 3: AI Configuration

  • Set up Google Cloud account with Gemini API access
  • Create API credentials for Google Palm/Gemini
  • Add the credentials to your n8n instance

Step 4: Workflow Customization

  • Update all Telegram chat IDs with your personal chat ID
  • Configure the daily trigger schedule according to your timezone
  • Test the workflow with sample emails

Requirements

  • Gmail account with API access enabled
  • Telegram bot and personal chat ID
  • Google Cloud account with Gemini API access
  • n8n instance (self-hosted or cloud)

All sensitive information like API keys, chat IDs, and email addresses should be configured using n8n's credential system rather than hardcoding them in the workflow.

How to customize the workflow

Modify Classification Logic

Edit the AI Email Classifier node's system prompt to adjust how emails are categorized based on your specific industry or email patterns.

Adjust Scheduling

Change the Daily 8AM Trigger to your preferred time zone and schedule for receiving email summaries.

Personalize Response Style

Customize the AI reply generator's system prompt to match your communication style, tone, and professional voice.

Enhance Filtering

Add additional filtering logic to process emails from specific senders, domains, or with particular keywords differently.

Extend Notifications

Configure multiple Telegram chats for different types of notifications (personal vs work) or add other messaging platforms.

Security Best Practices

  • Use n8n environment variables for sensitive configuration
  • Store all credentials securely using n8n's credential management
  • Avoid hardcoding personal information in node parameters
  • Test thoroughly in a development environment before production use

The workflow is designed to be flexible and easily adaptable to different email management needs while maintaining security and privacy standards.

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 - Check: Is Email in Inbox?

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

Block 2 - AI: Generate Email Reply

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

Block 3 - Telegram: Send + Approve

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 4 - Check: Telegram Approved?

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

Block 5 - Send Email Reply

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

Block 6 - Summarize Email with AI

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

Block 7 - Daily 8AM Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 8 - Organize Email Data

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

Block 9 - Email Summarizer

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

Block 10 - Structured Output Parser

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

Block 11 - Exit: Not in Inbox

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

Block 12 - Exit: Not Approved

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

Block 13 - Exit: Not Important

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

Block 14 - Google Gemini Chat Model1

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

Block 15 - Google Gemini Chat Model2

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

Block 16 - Google Gemini Chat Model3

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

Block 17 - Fetch Emails - Past 24 Hours1

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

Block 18 - Google Gemini Chat Model4

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

Block 19 - Structured Output Parser1

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

Block 20 - Real-time Email Trigger

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

Block 21 - AI Email Classifier

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

Block 22 - Route by Category

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 23 - Send Daily Report

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 24 - Send Summary to Telegram

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Gmail assistant with Google Gemini classification & Telegram notifications
Complexity advanced
Nodes 25
Categories AI Chatbot, Multimodal AI
Author Roshan Ramani
Published 25 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7803/7803.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 assistant with Google Gemini classification & Telegram notifications do?

Who's it for This template is designed for professionals, entrepreneurs, and busy individuals who receive high volumes of emails and want to automate their email management. Perfect for freelancers...

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.