Skip to main content

Gmail AI search assistant on Telegram (Gemini-powered)

Workflow preview

Workflow preview
100%
Gmail AI search assistant on Telegram (Gemini-powered) preview
Open on n8n.io

Important notice

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

1. Workflow Overview

The n8n Telegram Gmail Assistant is an intelligent workflow that lets you search and retrieve specific Gmail emails simply by messaging a Telegram bot. Powered by advanced language models, it turns...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.stickynote, n8n-nodes-base.telegramtrigger, n8n-nodes-base.set, n8n-nodes-base.gmail

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Gmail AI search assistant on Telegram (Gemini-powered)
Workflow name
Gmail AI search assistant on Telegram (Gemini-powered)

Overview

The n8n Telegram Gmail Assistant is an intelligent workflow that lets you search and retrieve specific Gmail emails simply by messaging a Telegram bot. Powered by advanced language models, it turns plain-language requests into precise Gmail searches, delivering results directly to your Telegram chat. This no-code automation is perfect for users who want instant, conversational access to their inbox—no Gmail tab required.

Key Features

Conversational Email Search: Just message the Telegram bot with requests like “Get me all emails from Amazon” or “Show unread emails after 6 June 2025.” The assistant understands sender names, keywords, and date filters—even if you only provide part of the information.

AI-Powered Query Parsing: Uses a language model (LLM) to intelligently extract sender, keywords, and date range from your message, then builds an accurate Gmail search query.

Flexible Filtering: Supports sender, keywords, ‘after’ and ‘before’ dates, or any combination. Handles both specific and broad queries.

Instant Telegram Delivery: Each matching email is formatted with date, sender, subject, and a snippet, and sent as a separate Telegram message for easy reading.

Customizable & Extendable: Swap the AI model (Google Gemini or OpenAI), adjust output formatting, and set email limits or read status as needed.

How It Works

  1. User Sends a Telegram Message: For example, “Get unread emails from Amazon about invoices after 1 June 2025.”
  2. AI Interprets the Request: The workflow’s LLM agent extracts sender, keywords, and date filters, converting them into a Gmail search query using Gmail’s syntax (e.g., from:amazon AND (invoice OR invoices) AND after:2025/06/01).
  3. Gmail Search: The workflow fetches all matching emails from your connected Gmail account.
  4. Message Formatting: Each email is summarized into a concise, emoji-rich Telegram message (date, sender, subject, snippet).
  5. Telegram Delivery: Results are sent to your Telegram chat, one message per email.

Setup Instructions

  1. Create a Telegram Bot: Use @BotFather on Telegram to create a bot and obtain the API token.
  2. Connect Telegram to n8n: Add your bot’s API token as a credential in n8n.
  3. Connect Gmail Account: Authorize your Gmail account in n8n, set email limits, and choose read/unread status preferences.
  4. Configure AI Model: Use your own Google Gemini or OpenAI API key, or select a preferred LLM node in the workflow.
  5. Deploy the Workflow: Activate the workflow and start messaging your Telegram bot to retrieve emails instantly.

Value Proposition

  • Save Time: No need to open Gmail or remember search operators—just ask in plain language.
  • Stay Organized: Instantly filter and retrieve important emails, even on the go.
  • User-Friendly: No coding required, with clear setup steps and customizable options.
  • Cost-Effective: Available simply with an n8n subscription—no extra costs or hidden fees of anything. Enjoy the workflow Free Forever within your n8n plan.

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 - Basic LLM Chain

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

Block 2 - Google Gemini Chat Model

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

Block 3 - Google Gemini Chat Model1

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

Block 4 - Basic LLM Chain1

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

Block 5 - AI Agent

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

Block 6 - Google Gemini Chat Model2

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

Block 7 - Structured Output Parser

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

Block 8 - Structured Output Parser1

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

Block 9 - Structured Output Parser2

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

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

Block 12 - Sticky Note2

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

Block 13 - Sticky Note3

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

Block 14 - Sticky Note4

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

Block 15 - User Request - Telegram Trigger

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

Block 16 - Set Parameters From User Request (for fetching emails)

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

Block 17 - Gets Requested Email(s)

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

Block 18 - Sets Parameters For Response

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

Block 19 - Sends (requested emails) via Telegram back

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

3. Summary Table

Workflow Gmail AI search assistant on Telegram (Gemini-powered)
Complexity advanced
Nodes 19
Categories Personal Productivity, AI Chatbot
Author Malik Hashir
Published 19 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5044/5044.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 search assistant on Telegram (Gemini-powered) do?

The n8n Telegram Gmail Assistant is an intelligent workflow that lets you search and retrieve specific Gmail emails simply by messaging a Telegram bot. Powered by advanced language models, it turns...

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