# Multi-department support bot with Pinecone and Telegram: n8n workflow

> Started by an incoming Telegram message, and works across Google Drive, Pinecone, Postgres and Telegram.

Source: https://millionrounds.com/workflow/multi-department-support-bot-with-pinecone-and-telegram (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)

# Multi-department support bot with Pinecone and Telegram

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

Large Calls a model: OpenRouter Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmulti-department-support-bot-with-pinecone-and-telegram)

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

**2** Branches: places the flow splits

**0** Loops or waits

**4** Services it connects to

## The flow

Starts it 4 Model 21 Logic 2 Service 19

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

- 1 **Google Drive Trigger** Google Drive trigger *Starts it*
- 2 **Embeddings Cohere3** Embeddings Cohere *Model*
- 3 **Character Text Splitter** Text Splitter Character Text Splitter *Model*
- 4 **Google Drive Trigger1** Google Drive trigger *Starts it*
- 5 **Embeddings Cohere4** Embeddings Cohere *Model*
- 6 **Character Text Splitter1** Text Splitter Character Text Splitter *Model*
- 7 **Google Drive Trigger2** Google Drive trigger *Starts it*
- 8 **Embeddings Cohere5** Embeddings Cohere *Model*
- 9 **Character Text Splitter2** Text Splitter Character Text Splitter *Model*
- 10 **Telegram Trigger** Telegram trigger *Starts it*
- 11 **Embeddings Cohere6** Embeddings Cohere *Model*
- 12 **OpenRouter Chat Model3** Lm Chat Open Router *Model*
- 13 **Simple Memory3** Memory Buffer Window *Model*
- 14 **Embeddings Cohere7** Embeddings Cohere *Model*
- 15 **Embeddings Cohere8** Embeddings Cohere *Model*
- 16 **Execute a SQL query** Postgres *Service*
- 17 **Download file** Google Drive *Service*
- 18 **Pinecone Vector Store3** Vector Store Pinecone *Model*
- 19 **Default Data Loader** Document Default Data Loader *Model*
- 20 **Download file1** Google Drive *Service*
- 21 **Pinecone Vector Store4** Vector Store Pinecone *Model*
- 22 **Default Data Loader1** Document Default Data Loader *Model*
- 23 **Download file2** Google Drive *Service*
- 24 **Pinecone Vector Store5** Vector Store Pinecone *Model*
- 25 **Default Data Loader2** Document Default Data Loader *Model*
- 26 **Execute a SQL query1** Postgres *Service*
- 27 **Pinecone Vector Store6** Vector Store Pinecone *Model*
- 28 **AI Agent3** Agent *Model*
- 29 **Pinecone Vector Store7** Vector Store Pinecone *Model*
- 30 **Pinecone Vector Store8** Vector Store Pinecone *Model*
- 31 **Select rows from a table** Postgres *Service*
- 32 **Send a text message1** Telegram *Service*
- 33 **Switch1** Switch *Logic*
- 34 **Send a text message** Telegram *Service*
- 35 **Send a text message4** Telegram *Service*
- 36 **Execute a SQL query2** Postgres *Service*
- 37 **Switch** Switch *Logic*
- 38 **Execute a SQL query3** Postgres *Service*
- 39 **Send a text message2** Telegram *Service*
- 40 **return policy** Telegram *Service*
- 41 **talk technical** Telegram *Service*
- 42 **billing** Telegram *Service*
- 43 **Send a text message3** Telegram *Service*
- 44 **return policy1** Postgres *Service*
- 45 **tech questions** Postgres *Service*
- 46 **billing1** Postgres *Service*

## How it's built

- **Starts on:** An incoming Telegram message
- **Steps:** 46, with 2 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Drive, Pinecone, Postgres, Telegram
- **Model:** OpenRouter
- **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, Pinecone, Postgres and Telegram accounts, and a key for OpenRouter. 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 OpenRouter. 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 46 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 46 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%2Fmulti-department-support-bot-with-pinecone-and-telegram)
- **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)[Pinecone](https://millionrounds.com/workflows?service=Pinecone#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#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.

- [**Create a multi-modal Telegram support bot with OpenAI** 48 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/create-a-multi-modal-telegram-support-bot-with-openai)
- [**Handle WhatsApp support chats with OpenRouter and Pinecone** 44 steps · calls a model · Pinecone, WhatsApp](https://millionrounds.com/workflow/handle-whatsapp-support-chats-with-openrouter-and-pinecone)
- [**Route WhatsApp customer support with OpenAI** 48 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/route-whatsapp-customer-support-with-openai)
- [**Route RAG customer support across WhatsApp and Outlook** 41 steps · calls a model · Google Sheets, Outlook](https://millionrounds.com/workflow/route-rag-customer-support-across-whatsapp-and-outlook)
- [**Build an AI-powered SMS support system with Twilio and OpenAI** 40 steps · calls a model · Gmail, Postgres](https://millionrounds.com/workflow/build-an-ai-powered-sms-support-system-with-twilio-and-opena)
- [**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)
