# AI powered RAG chatbot for your docs + Google Drive + Gemini: n8n workflow

> Started by someone opening a chat with it, and works across Google Docs, Google Drive, Qdrant and Telegram.

Source: https://millionrounds.com/workflow/ai-powered-rag-chatbot-for-your-docs-google-drive-gemini (Millionrounds; every figure on the page links to its filing or article)

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

# AI powered RAG chatbot for your docs + Google Drive + Gemini

Started by someone opening a chat with it, and works across Google Docs, Google Drive, Qdrant and Telegram. It puts Gemini and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 35 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%2Fai-powered-rag-chatbot-for-your-docs-google-drive-gemini)

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

**1** Branch: places the flow splits

**2** Loops or waits

**4** Services it connects to

## The flow

Starts it 3 Model 14 Logic 9 Service 9

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

- 1 **Token Splitter** Text Splitter Token Splitter *Model*
- 2 **When clicking ‘Test workflow’** Manual trigger *Starts it*
- 3 **Google Gemini Chat Model** Lm Chat Google Gemini *Model*
- 4 **text-embeddings-3-large** Embeddings Open Ai *Model*
- 5 **gpt-4o-mini1** Lm Chat Open Ai *Model*
- 6 **Webhook** Webhook *Starts it*
- 7 **Window Buffer Memory** Memory Buffer Window *Model*
- 8 **When chat message received** Chat trigger *Starts it*
- 9 **Google Gemini Chat Model1** Lm Chat Google Gemini *Model*
- 10 **text-embeddings-3-large1** Embeddings Open Ai *Model*
- 11 **Google Drive** Google Drive *Service*
- 12 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 13 **Data Loader** Document Default Data Loader *Model*
- 14 **Google Folder ID** Set *Logic*
- 15 **Extract Meta Data** Information Extractor *Model*
- 16 **Qdrant Vector Store** Vector Store Qdrant *Model*
- 17 **Delete Qdrant Points by File ID** Code *Model*
- 18 **AI Agent** Agent *Model*
- 19 **Qdrant Vector Store Tool** Vector Store Qdrant *Model*
- 20 **Find File Ids in Google Drive Folder** Google Drive *Service*
- 21 **Merge** Merge *Logic*
- 22 **Wait** Wait *Logic*
- 23 **Merge2** Merge *Logic*
- 24 **Update Chat History** Google Docs *Service*
- 25 **Respond to User** Set *Logic*
- 26 **File Id List** Summarize *Service*
- 27 **Qdrant Collection Name** Set *Logic*
- 28 **Loop Over Items** Split In Batches *Logic*
- 29 **Merge1** Merge *Logic*
- 30 **Send Completed Message** Telegram *Service*
- 31 **Download File From Google Drive** Google Drive *Service*
- 32 **Confirm Qdrant Delete Points** Telegram *Service*
- 33 **Get File Contents** Extract From File *Service*
- 34 **If** If *Logic*
- 35 **Send Declined Message** Telegram *Service*

## How it's built

- **Starts on:** Someone opening a chat with it
- **Steps:** 35, with 1 branch, 2 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** 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 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 someone opening a chat with it.

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 35 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 35 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%2Fai-powered-rag-chatbot-for-your-docs-google-drive-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 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 chat assistants, with the same services where possible, closest in size first.

- [**Assist hospital doctors with Telegram and OpenAI** 34 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/assist-hospital-doctors-with-telegram-and-openai)
- [**Classify and auto-reply to Gmail with OpenAI** 34 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/classify-and-auto-reply-to-gmail-with-openai)
- [**Email management system with OpenAI and Pinecone DB** 34 steps · calls a model · Gmail, Pinecone](https://millionrounds.com/workflow/email-management-system-with-openai-and-pinecone-db)
- [**Evaluate job fit and generate application assets** 34 steps · calls a model · Apify, Gmail](https://millionrounds.com/workflow/evaluate-job-fit-and-generate-application-assets)
- [**Manage rent, maintenance and tenant messages with OpenAI** 34 steps · calls a model · Google Sheets, Slack](https://millionrounds.com/workflow/manage-rent-maintenance-and-tenant-messages-with-openai)
- [**Build a comprehensive multimodal assistant on Telegram** 33 steps · calls a model · Telegram, in-memory vectors](https://millionrounds.com/workflow/build-a-comprehensive-multimodal-assistant-on-telegram)
