Skip to main content

Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools)

Workflow preview

Workflow preview
100%
Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools) preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This n8n template builds Stacey , an AI assistant that runs inside Telegram. Stacey listens to your messages, understands what you want using AI, and intelligently routes commands to MCP conne...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.toolworkflow, @n8n/n8n-nodes-langchain.toolhttprequest, n8n-nodes-base.stickynote, n8n-nodes-base.set, n8n-nodes-base.telegram, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.telegramtrigger, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools)
Workflow name
Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools)

> This n8n template builds Stacey, an AI assistant that runs inside Telegram. Stacey listens to your messages, understands what you want using AI, and intelligently routes commands to MCP-connected tools — like Gmail, Google Calendar, a blog writer, and more. > > For optimal performance, we recommend using OpenAI’s GPT-4o model. In this template, Google Gemini is used as a free alternative.


💡 Who is this for?

This workflow is designed for:

  • AI tool creators and automation builders
  • Entrepreneurs who want an intelligent Telegram assistant
  • Support and scheduling teams who use Google tools
  • Agencies that build & resell AI automations
  • Users looking to automate everyday actions like emails, scheduling, blog writing, and contact lookups

🧠 What this workflow does

  • Listens to Telegram messages (text and voice)

  • Transcribes audio using Whisper (optional)

  • Uses Stacey, an AI agent powered by Gemini (or GPT-4o if you upgrade), to:

    • Understand the user's intent
    • Choose the correct tool using MCP logic
    • Execute tasks using Gmail, Google Calendar, blog writer, and more
  • Responds to the user naturally with confirmations and outputs


⚙️ Prerequisites

Before using this workflow, make sure you have:

  • A self-hosted or cloud-based n8n instance

  • A Telegram Bot Token from @BotFather

  • Google OAuth2 credentials for:

    • Gmail
    • Google Calendar
  • Optional: OpenAI or Whisper API key for voice transcription

  • Optional: Tavily API key for live web search

  • Gemini (Google AI) is preconfigured in the template but can be swapped


🚀 Step-by-Step Setup

✅ Step 1: Add Required Credentials in n8n

Go to Settings → Credentials and add:

  • Telegram API: Your bot token from BotFather

  • Google OAuth2:

    • Gmail: Scope https://www.googleapis.com/auth/gmail.modify
    • Calendar: Scope https://www.googleapis.com/auth/calendar
  • Gemini / Palm API: Used for the language model

  • (Optional) OpenAI Whisper: For voice transcription

  • (Optional) Tavily: For real-time internet searches


✅ Step 2: Import the Workflow

  1. Go to n8n

  2. Click Workflows → Import from File

  3. Upload ai_assistant.json

  4. Connect your saved credentials to the correct nodes:

    • Telegram Trigger & Sender
    • Gmail, Calendar, Tavily, Gemini, Whisper

✅ Step 2.5: Import the Content Creator Sub-Workflow

The Content Creator is implemented as a modular sub-workflow and invoked through the Map Server as part of the MCP logic.

To set it up:

Go to Workflows → Import from File Upload content_creator_tool.json (provided in your files) Save it with a name like “Content Creator Tool” 🔗 Integration with MCP:

This tool is triggered via the MCP Map Server using an Execute Workflow node The AI agent chooses this tool when the user request involves writing blog posts, emails, product descriptions, etc. Make sure the tool ID or name in the Map Server matches what the AI agent uses in its logic You can customize this sub-workflow to:

Adjust writing prompts (e.g., tone, format, target audience) Add branching for different content types (e.g., blog vs. email) Send outputs directly to Gmail, Google Docs, or Sheets

✅ Step 3: Set Up Your Telegram Bot

  1. Talk to @BotFather

  2. Use /newbot to create a bot and get your token

  3. Paste this token into:

    • Telegram Trigger node (Telegram Trigger1)
    • Telegram Send Message node (Response1)
  4. Make sure your bot’s privacy is set correctly (use /setprivacy)


✅ Step 4: Customize Your Assistant’s Personality

  1. Open the “AI Agent” node

  2. In the systemMessage field, you'll find a prompt that defines Stacey:

    • Her role is to delegate user requests to the right MCP tool
    • Includes examples, tone, rules, and logic
  3. You can customize Stacey’s:

    • Name
    • Behavior
    • Supported tools

✅ Step 5: Define Your MCP Tools (if extending)

This template includes:

  • Send Email
  • Reply to Email
  • Get Emails
  • Label Emails
  • Create/Update/Delete Events
  • Content Creator
  • Search Web with Tavily
  • Calculator

To extend:

  • Add a new tool node
  • Link it to MCP Server Trigger
  • Reference it in the prompt in AI Agent node

✅ Step 6: Test the Workflow

Open Telegram and message your bot:

  • “Send an email to John about the new budget”
  • “Schedule a meeting Friday at 3 PM with Alex”
  • “Write a blog post about solar energy”
  • “What’s in my inbox?”
  • “Translate this message” (if extended with translation tools)

The bot will:

  • Interpret the intent
  • Ask for any missing data
  • Trigger the right tool
  • Send confirmation via Telegram

✨ Customization Ideas

✏️ Add Voice Transcription

  • Enable the Download File and Transcribe nodes
  • Requires OpenAI Whisper API key

🧠 Upgrade to GPT-4o

  • Replace the Gemini node with an OpenAI Chat node
  • Connect GPT-4o for improved reasoning and language understanding

🧩 Add More Tools

  • Notion, Slack, Salesforce, Hubspot, WhatsApp, and more can be added
  • Just route them via MCP and update the AI prompt

🧪 Troubleshooting

Telegram not responding?

  • Ensure correct bot token and webhook connection
  • Make sure the bot is not in privacy mode if needed

Gmail actions not working?

  • Double-check your OAuth scopes
  • Ensure Gmail API is enabled in your Google Cloud project

AI not responding or behaving poorly?

  • Consider upgrading to OpenAI GPT-4o for better reasoning
  • Revisit and refine your system prompt

🧾 Summary

  • Name: Stacey – AI Telegram Assistant
  • Built with: n8n + Gemini + Google + MCP Logic
  • Telegram acts as the front-end
  • Gemini or GPT-4o powers intelligence
  • MCP routes user intent to the right tool
  • Fully extensible and no-code friendly

🌟 Credits & License

Created by David Olusola Free to use, modify, and resell with attribution. If this helped you, please rate the template or follow me on the n8n Creator Page.


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 - Content Creator Agent

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

Block 2 - Tavily

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

Block 3 - Sticky Note2

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

Block 4 - Sticky Note4

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

Block 5 - Set 'Text'

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

Block 6 - Download File

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

Block 7 - Transcribe

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

Block 8 - Telegram Trigger1

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

Block 9 - Response1

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

Block 10 - AI Agent

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

Block 11 - MCP Client

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

Block 12 - MCP Server Trigger

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

Block 13 - Create Event with Attendee

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

Block 14 - Create Event

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

Block 15 - Get Events

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

Block 16 - Delete Event

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

Block 17 - Update Event

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

Block 18 - Send Email

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

Block 19 - Get Emails

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

Block 20 - Create Draft

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

Block 21 - Email Reply

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

Block 22 - Get Labels

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

Block 23 - Label Emails

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

Block 24 - Mark Unread

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

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

3. Summary Table

Workflow Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools)
Complexity advanced
Nodes 32
Categories Personal Productivity, AI Chatbot
Author David Olusola
Published 13 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4025/4025.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 Stacey – your Telegram AI assistant (powered by MCP, Gemini & Google tools) do?

This n8n template builds Stacey , an AI assistant that runs inside Telegram. Stacey listens to your messages, understands what you want using AI, and intelligently routes commands to MCP conne...

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.