Skip to main content

Manage Google Calendar and Gmail from Telegram with a Claude AI assistant

Workflow preview

Workflow preview
100%
Manage Google Calendar and Gmail from Telegram with a Claude AI assistant preview
Open on n8n.io

1. Workflow Overview

Telegram AI Personal Assistant — Calendar & Email Manager This workflow turns a Telegram bot into a fully functional personal AI assistant capable of handling your schedule and inbox through natura...

Best for

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

Tools used

n8n-nodes-base.switch, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.set, n8n-nodes-base.merge, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenrouter

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Manage Google Calendar and Gmail from Telegram with a Claude AI assistant
Workflow name
Manage Google Calendar and Gmail from Telegram with a Claude AI assistant

Telegram AI Personal Assistant — Calendar & Email Manager

This workflow turns a Telegram bot into a fully functional personal AI assistant capable of handling your schedule and inbox through natural conversation. Send it a text message, record a voice note, or snap a photo — it understands all three and responds intelligently.

The assistant is powered by Claude Haiku (via OpenRouter) and comes with a built-in 30-message memory buffer, so it remembers context across a conversation just like a real assistant would. It has full read/write access to Google Calendar and Gmail, meaning it can book meetings, check your availability, send emails, reply to threads, and clean up your inbox — all from a single Telegram chat.


What this workflow does

Multi-modal input handling

  • Text messages are processed directly
  • Voice notes are downloaded from Telegram and transcribed using OpenAI Whisper
  • Photos are downloaded and analyzed using GPT-4o vision, with any caption included as additional context

All three input types are normalized into a unified context object before reaching the agent, so the AI always receives clean, structured input regardless of how the user communicated.

Authorization layer Only the allowlisted Telegram User ID can interact with the assistant. Any unauthorized message receives an instant rejection and the workflow stops — no agent calls are made.

AI agent with tools The LangChain agent receives the full context and decides autonomously whether to reply conversationally or invoke one of the connected tools. It uses the current date/time from n8n to handle scheduling requests accurately.

Google Calendar tools: check availability, create events, list upcoming events, fetch a specific event, update event details, delete events.

Gmail tools: send new emails, search the inbox, read a specific email, reply to a thread, delete messages.

Persistent memory Each user's conversation is tracked using a sliding window of the last 30 messages, keyed by their Telegram User ID. The assistant remembers what was said earlier in the same session without needing reminders.


Example use cases

  • "What do I have on Thursday?" → fetches and summarizes calendar events
  • "Schedule a call with Ahmed tomorrow at 3pm" → creates a calendar event
  • "Any emails from the client today?" → searches Gmail and summarizes results
  • "Reply to John's last email and say I'll confirm by Friday" → reads the thread and sends a reply
  • [sends a photo of a meeting invite] → extracts details from the image and creates a calendar event

Setup instructions

  1. Telegram API — create a bot via @BotFather and connect the token to the Telegram Trigger node and both send nodes.
  2. OpenAI API — required for Whisper voice transcription and GPT-4o image analysis.
  3. OpenRouter API — used to run Claude Haiku as the agent's language model. You can swap this for any OpenRouter-compatible model.
  4. Google Calendar OAuth2 — authorize your Google account and update the calendar ID (currently set to an example address) in all six calendar tool nodes.
  5. Gmail OAuth2 — authorize your Gmail account in all five Gmail tool nodes.
  6. User authorization — open the If node and replace the placeholder value with your own Telegram numeric User ID. You can find this by messaging @userinfobot on Telegram.

Customization tips

  • To support multiple authorized users, replace the If node with a list-based check or a Code node that checks against an array of allowed IDs.
  • To change the AI model, swap the OpenRouter Chat Model node — the agent prompt and all tools remain fully compatible.
  • To adjust memory length, change the contextWindowLength value in the Simple Memory node (currently 30 messages).
  • To modify the assistant's personality or add new instructions, edit the system prompt inside the MainAgent node.
  • Additional tools (e.g. Notion, Slack, Airtable) can be connected to the MainAgent node as sub-nodes without changing any other part of the workflow.

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 - Switch

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

Block 2 - Get Audio

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

Block 3 - OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 4 - Edit Fields

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

Block 5 - Telegram2

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

Block 6 - Merge

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

Block 7 - Send a text message1

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

Block 8 - If

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

Block 9 - Analyze image

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

Block 10 - Input

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

Block 11 - fields

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

Block 12 - MainAgent

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

Block 13 - OpenRouter Chat Model1

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

Block 14 - Send a text message

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

Block 15 - Simple Memory

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

Block 16 - createEvent

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

Block 17 - GetManyEvents

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

Block 18 - GetEvent

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

Block 19 - DeleteEvent

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

Block 20 - Availability

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

Block 21 - UpdateEvent

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

Block 22 - Telegram Trigger

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

Block 23 - sendMessage

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

Block 24 - getEmails

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

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

3. Summary Table

Workflow Manage Google Calendar and Gmail from Telegram with a Claude AI assistant
Complexity advanced
Nodes 31
Categories Personal Productivity, AI Chatbot
Author Ghufran Barcha
Published 03 Apr 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14666/14666.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 Manage Google Calendar and Gmail from Telegram with a Claude AI assistant do?

Telegram AI Personal Assistant — Calendar & Email Manager This workflow turns a Telegram bot into a fully functional personal AI assistant capable of handling your schedule and inbox through natura...

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.