> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/advanced-ai/recipes/rag-google-drive.md).

# Build a Duaer chatbot that answers from Google Drive docs

In Duaer, chunk the documents in a Google Drive folder into a vector store, then let an AI Agent retrieve the relevant pieces to answer each question.
## Part one: load documents into a vector store in Duaer

1. Add Manual Trigger, or [Schedule Trigger](/build/schedule-trigger.md) when the documents change often.
2. Add [Google Drive](/build/google-drive.md) with Resource File/Folder, Operation Search, filtered to your folder.
3. Add another Google Drive with Resource File, Operation Download, File {{ $json.id }}. For Google Docs, set Google File Conversion under Options to PDF or plain text.
4. Add [Simple Vector Store](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.vectorstoreinmemory.md) with Operation Mode Insert Documents and Memory Key drive_docs.
5. Attach three sub-nodes: [Embeddings OpenAI](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.embeddingsopenai.md); [Default Data Loader](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.documentdefaultdataloader.md) with Type of Data Binary; [Recursive Character Text Splitter](/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.textsplitterrecursivecharactertextsplitter.md) with chunk size 1000 and overlap 200.
6. Run it once to load the documents.

## Part two: answer questions in Duaer

1. Add Chat Trigger and connect an [AI Agent](/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent.md).
2. On Chat Model attach [Duaer Chat Model](/build/duaer-chat-model.md) and pick a model by price; no key needed.
3. On Tool attach a Simple Vector Store with Operation Mode Retrieve Documents (As Tool for AI Agent), Memory Key drive_docs, and a description such as Company Google Drive documents.
4. Attach the same Embeddings OpenAI model below it. Load and retrieval must use the same embedding model.
5. Open the chat panel and ask. The agent retrieves first, then answers.

## Before you go live

Simple Vector Store lives in Duaer process memory, so rerun part one after a restart. For lasting storage, switch to Postgres PGVector, Qdrant, or Pinecone with the same steps. Background: [Retrieve relevant context with RAG in Duaer](/advanced-ai/rag-in-duaer.md).
## Questions

### Can Duaer RAG read Google Docs and Sheets?

Yes. The Duaer Google Drive Download operation converts Google files to PDF or plain text with Google File Conversion before the Default Data Loader.

### Does the Duaer Simple Vector Store survive a restart?

No. Simple Vector Store lives in Duaer memory and suits trials; use PGVector, Qdrant, or Pinecone for lasting storage.

## Related

- [Retrieve relevant context with RAG in Duaer](https://doc.duaer.com/advanced-ai/rag-in-duaer.md)
- [Upload a file with Google Drive in Duaer](https://doc.duaer.com/build/google-drive.md)
- [Pick a model in Duaer Chat Model](https://doc.duaer.com/build/duaer-chat-model.md)
- [Set up Google OAuth2 single service credentials in Duaer](https://doc.duaer.com/integrations/builtin/credentials/google/oauth-single-service.md)

