# Build a multi-functional Telegram bot with Gemini: n8n workflow

> Started by an incoming Telegram message, and works across Google Calendar, Google Docs, Google Drive, Qdrant and one other.

Source: https://millionrounds.com/workflow/build-a-multi-functional-telegram-bot-with-gemini (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Scheduling](https://millionrounds.com/workflows?category=Scheduling#library)

# Build a multi-functional Telegram bot with Gemini

Started by an incoming Telegram message, and works across Google Calendar, Google Docs, Google Drive, Qdrant and one other. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 65 steps, 1 branch, 2 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: Gemini, OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fbuild-a-multi-functional-telegram-bot-with-gemini)

**65 steps** Large: read it before trusting it with anything live

**1** Branch: places the flow splits

**2** Loops or waits

**5** Services it connects to

## The flow

Starts it 1 Model 20 Logic 6 Service 33

The steps in the order they run, from what starts it. The first 60 of 65.

- 1 **Listen for incoming events** Telegram trigger *Starts it*
- 2 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 3 **Think** Tool Think *Model*
- 4 **Calculator** Tool Calculator *Model*
- 5 **Date & Time** Date Time Tool *Service*
- 6 **Brave Search** Brave Search Tool *Service*
- 7 **Google Calendar Create Event** Google Calendar Tool *Service*
- 8 **Google Calendar Next Holiday** Google Calendar Tool *Service*
- 9 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 10 **Gemini for RAG Answer** Lm Chat Google Gemini *Model*
- 11 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 12 **Token Splitter** Text Splitter Token Splitter *Model*
- 13 **Google Gemini Chat Model1** Lm Chat Google Gemini *Model*
- 14 **Think1** Tool Think *Model*
- 15 **Calculator1** Tool Calculator *Model*
- 16 **Date & Time1** Date Time Tool *Service*
- 17 **Brave Search1** Brave Search Tool *Service*
- 18 **Google Calendar Create Event1** Google Calendar Tool *Service*
- 19 **Google Calendar Next Holiday1** Google Calendar Tool *Service*
- 20 **Window Buffer Memory2** Memory Buffer Window *Model*
- 21 **Window Buffer Memory** Memory Buffer Window *Model*
- 22 **Airbnb MCP** Mcp Client Tool *Service*
- 23 **Airbnb Tools** Mcp Client Tool *Service*
- 24 **Airbnb MCP1** Mcp Client Tool *Service*
- 25 **Airbnb Tools1** Mcp Client Tool *Service*
- 26 **Send Typing action** Telegram *Service*
- 27 **Determine content type1** Switch *Logic*
- 28 **AI Agent1** Agent *Model*
- 29 **Qdrant Vector Store1** Vector Store Qdrant *Model*
- 30 **Question and Answer Chain** Chain Retrieval Qa *Model*
- 31 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 32 **Default Data Loader** Document Default Data Loader *Model*
- 33 **AI Agent3** Agent *Model*
- 34 **Help Responder1** Telegram *Service*
- 35 **Refresh collection** Http Request *Service*
- 36 **Get PDF** Google Drive *Service*
- 37 **Google Calendar 2** Google Calendar *Service*
- 38 **Brave Search 2** Brave Search *Service*
- 39 **Download voice file** Telegram *Service*
- 40 **Edit Fields** Set *Logic*
- 41 **Send AI Text Response (Chat)** Telegram *Service*
- 42 **Vector Store Retriever** Retriever Vector Store *Model*
- 43 **Send RAG Answer via Telegram** Telegram *Service*
- 44 **Wait** Wait *Logic*
- 45 **Call Replicate API** Http Request *Service*
- 46 **Search PDFs** Google Drive *Service*
- 47 **Mistral Upload** Http Request *Service*
- 48 **Send Birthday List via Telegram** Telegram *Service*
- 49 **Send Brave Search Results via Telegram** Telegram *Service*
- 50 **Convert audio to text** Open Ai *Model*
- 51 **Google Drive** Google Drive *Service*
- 52 **Loop Over Items** Split In Batches *Logic*
- 53 **Download Replicate Audio** Http Request *Service*
- 54 **Send PDF Search Results via Telegram** Telegram *Service*
- 55 **Mistral Signed URL** Http Request *Service*
- 56 **Combine content and set properties** Set *Logic*
- 57 **Google Docs** Google Docs *Service*
- 58 **Send Qdrant Indexing Confirmation** Telegram *Service*
- 59 **Set page** Set *Logic*
- 60 **Send AI Voice Response via Telegram** Telegram *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 65, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Calendar, Google Docs, Google Drive, Qdrant, Telegram
- **Model:** Gemini, OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Google Calendar, Google Docs, Google Drive, Qdrant and Telegram accounts, and a key for Gemini and OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an incoming Telegram message.

Does it use AI?

Yes. It calls Gemini and OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 65 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 65 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fbuild-a-multi-functional-telegram-bot-with-gemini)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Calendar](https://millionrounds.com/workflows?service=Google+Calendar#library)[Google Docs](https://millionrounds.com/workflows?service=Google+Docs#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Qdrant](https://millionrounds.com/workflows?service=Qdrant#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

Also scheduling, with the same services where possible, closest in size first.

- [**Build a WhatsApp assistant with Google Suite** 63 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/build-a-whatsapp-assistant-with-google-suite)
- [**Multi-platform AI sales agent with RAG and CRM** 71 steps · calls a model · Airtable, Google Calendar](https://millionrounds.com/workflow/multi-platform-ai-sales-agent-with-rag-and-crm)
- [**Automated HR Service System with WhatsApp and OpenAI** 57 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automated-hr-service-system-with-whatsapp-and-openai)
- [**Automate salon appointment management with WhatsApp and OpenAI** 56 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/automate-salon-appointment-management-with-whatsapp-and-open)
- [**Automated multi-platform sales agent with Gemini** 75 steps · calls a model · Google Calendar, Postgres](https://millionrounds.com/workflow/agente-de-ventas-automatizado-multiplataforma-with-gemini)
- [**Multi-agent salon appointment management with Telegram** 52 steps · calls a model · Google Calendar, Redis](https://millionrounds.com/workflow/multi-agent-salon-appointment-management-with-telegram)
