# Create a multi-modal Telegram support bot with OpenAI: n8n workflow

> Started by an incoming Telegram message, and works across Google Drive, Supabase vectors and Telegram.

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

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

# Create a multi-modal Telegram support bot with OpenAI

Started by an incoming Telegram message, and works across Google Drive, Supabase vectors and Telegram. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 48 steps, 3 branches: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcreate-a-multi-modal-telegram-support-bot-with-openai)

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

**3** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 2 Model 13 Logic 15 Service 18

The steps in the order they run, from what starts it.

- 1 **Telegram Trigger** Telegram trigger *Starts it*
- 2 **When clicking ‘Execute workflow’** Manual trigger *Starts it*
- 3 **Recursive Character Text Splitter1** Text Splitter Recursive Character Text Splitter *Model*
- 4 **OpenAI Chat Model1** Lm Chat Open Ai *Model*
- 5 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 6 **Embeddings OpenAI1** Embeddings Open Ai *Model*
- 7 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 8 **Reranker Cohere** Reranker Cohere *Model*
- 9 **Input Message Router** Switch *Logic*
- 10 **Typing…** Telegram *Service*
- 11 **Download file** Google Drive *Service*
- 12 **Default Data Loader1** Document Default Data Loader *Model*
- 13 **Knowledge Base AI Agent** Agent *Model*
- 14 **Add to Supabase Vector DB** Vector Store Supabase *Model*
- 15 **Supabase Vector Store Search** Vector Store Supabase *Model*
- 16 **Extract Text** Set *Logic*
- 17 **Download Audio** Telegram *Service*
- 18 **Download Photo** Telegram *Service*
- 19 **Supported Document File Types** Code *Logic*
- 20 **Telegram** Telegram *Service*
- 21 **Translate to Text** Open Ai *Model*
- 22 **Fix mimeType1** Code *Logic*
- 23 **If** If *Logic*
- 24 **Photo to text** Open Ai *Model*
- 25 **Group Similar Documents** Code *Logic*
- 26 **Extract Error Message** Set *Logic*
- 27 **Extract Text & Content** Set *Logic*
- 28 **Document Router** Switch *Logic*
- 29 **Download Image** Telegram *Service*
- 30 **Download PDF** Telegram *Service*
- 31 **Download Word Document** Telegram *Service*
- 32 **Download Spreadsheet** Telegram *Service*
- 33 **Download JSON** Telegram *Service*
- 34 **Download XML** Telegram *Service*
- 35 **Fix mimeType** Code *Logic*
- 36 **Extract from PDF** Extract From File *Service*
- 37 **File to Base64** Extract From File *Service*
- 38 **Extract from Spreadsheet** Extract From File *Service*
- 39 **Extract from JSON** Extract From File *Service*
- 40 **Extract from XML** Extract From File *Service*
- 41 **Photo to text1** Open Ai *Model*
- 42 **Extract Text4** Set *Logic*
- 43 **Convert to text (convertapi.com)** Http Request *Service*
- 44 **Extract Text1** Set *Logic*
- 45 **Extract Text2** Set *Logic*
- 46 **Extract Text3** Set *Logic*
- 47 **Download Text** Http Request *Service*
- 48 **Extract Text5** Set *Logic*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 48, with 3 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Supabase vectors, Telegram
- **Model:** 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 Drive, Supabase vectors and Telegram accounts, and a key for 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 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 48 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 48 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%2Fcreate-a-multi-modal-telegram-support-bot-with-openai)
- **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 Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)[Telegram](https://millionrounds.com/workflows?service=Telegram#library)

## Workflows like it

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

- [**Route WhatsApp customer support with OpenAI** 48 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/route-whatsapp-customer-support-with-openai)
- [**Multi-department support bot with Pinecone and Telegram** 46 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/multi-department-support-bot-with-pinecone-and-telegram)
- [**Answer HR policy and benefits questions with BambooHR** 39 steps · calls a model · Supabase vectors](https://millionrounds.com/workflow/answer-hr-policy-and-benefits-questions-with-bamboohr)
- [**Route WhatsApp support requests with Claude and Supabase** 37 steps · calls a model · Gmail, Google Calendar](https://millionrounds.com/workflow/route-whatsapp-support-requests-with-claude-and-supabase)
- [**WhatsApp AI customer service chatbot – handles text, voice** 37 steps · calls a model · Google Drive, Postgres](https://millionrounds.com/workflow/whatsapp-ai-customer-service-chatbot-handles-text-voice)
- [**Use OCR and vector search to answer questions with WhatsApp** 35 steps · calls a model · Google Drive, Pinecone](https://millionrounds.com/workflow/use-ocr-and-vector-search-to-answer-questions-with-whatsapp)
