AI Agents

Build an intelligent assistant for Google Drive document queries

50 nodes 228 137 Automatic trigger
Download

Workflow Description

An automation that transforms Google Drive documents into a searchable knowledge base using RAG technology, where an AI assistant answers user questions via Telegram and other apps based on stored file content.

How it works

  1. 1.Load documents from Google Drive and split them into processable text chunks
  2. 2.Convert text into numerical vectors and store them in a vector database (Qdrant)
  3. 3.Receive a user question via Telegram or chat interface and route it to the AI assistant
  4. 4.Search for the most relevant passages from the knowledge base and generate an answer using Gemini or OpenAI models
  5. 5.Send the response directly to the user while maintaining conversation context for follow-up questions

Use cases

  • Enterprise assistant that answers employee questions about company policies and procedures from stored documents
  • Customer support bot that provides instant answers based on knowledge base and documentation
  • Smart search application for lawyers and consultants to find relevant information in contracts and documents
  • Internal documentation system that answers technical questions from development teams based on guides and reports

Requirements

  • Google Drive account containing the documents to be searched
  • API keys for OpenAI and/or Google Gemini
  • Active Telegram account (optional for bot integration)
  • n8n platform with ability to run long-running processes

Service Value

Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.

Apps Used

Document Default Data Loader Text Splitter Vector Store Split In Batches Gemini Twitter/X Google Drive OpenAI Telegram AI Agent Memory Chat Trigger Google Docs

Details

Trigger Automatic trigger
Nodes 50
Apps 13
Views 228
Downloads 137

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (50)

/

Data Loader

Document Default Data Loader

#1

Token Splitter

Text Splitter Token Splitter

#2

Qdrant Vector Store

Vector Store Qdrant

#3

Loop Over Items

Split In Batches

#4

Wait

Wait

#5

When clicking ‘Test workflow’

Manual Trigger

#6

Google Gemini Chat Model

Gemini Model

#7

Merge

Merge

#8

Extract Meta Data

Information Extractor

#9

Get File Contents

Extract From File

#10

Download File From Google Drive

Google Drive

#11

Find File Ids in Google Drive Folder

Google Drive

#12

text-embeddings-3-large

OpenAI

#13

Google Folder ID

Set

#14

gpt-4o-mini1

OpenAI

#15

Delete Qdrant Points by File ID

Code

#16

Qdrant Collection Name

Set

#17

File Id List

Summarize

#18

Merge1

Merge

#19

Merge2

Merge

#20

Sticky Note

Sticky Note

#21

Confirm Qdrant Delete Points

Set

#22

If

If

#23

Sticky Note1

Sticky Note

#24

Send Declined Message

Set

#25

Sticky Note2

Sticky Note

#26

Sticky Note3

Sticky Note

#27

Sticky Note4

Sticky Note

#28

Sticky Note5

Sticky Note

#29

Sticky Note6

Sticky Note

#30

Sticky Note7

Sticky Note

#31

Sticky Note8

Sticky Note

#32

Webhook

Webhook

#33

AI Agent

Agent

#34

Window Buffer Memory

Memory Buffer Window

#35

When chat message received

Chat Trigger

#36

Google Gemini Chat Model1

Gemini Model

#37

text-embeddings-3-large1

OpenAI

#38

Sticky Note9

Sticky Note

#39

Sticky Note10

Sticky Note

#40

Sticky Note11

Sticky Note

#41

Sticky Note12

Sticky Note

#42

Google Drive

Google Drive

#43

Respond to User

Set

#44

Sticky Note13

Sticky Note

#45

Update Chat History

Google Docs

#46

Qdrant Vector Store Tool

Vector Store Qdrant

#47

OpenAI Chat Model

OpenAI

#48

Send Completed Message

Set

#49

Sticky Note14

Sticky Note

#50