AI Agents

Intelligent chatbot with RAG for Google Drive documents

50 nodes 356 180 Automatic trigger
Download

Workflow Description

Build an AI agent that retrieves information from Google Drive files and answers user questions via Telegram or X, maintaining conversation history in memory for continuous context.

How it works

  1. 1.Load documents from Google Drive and split them into smaller text chunks
  2. 2.Convert text to vector embeddings and store in a vector database
  3. 3.Process user messages from Telegram or X and route them to the AI agent
  4. 4.Search stored documents and retrieve relevant answers
  5. 5.Send AI-generated responses via Gemini or OpenAI back to the user

Use cases

  • Answer employee questions about company policies and stored files
  • Provide self-service technical support based on product knowledge base
  • Automatically extract information from contracts and client reports

Requirements

  • Google Drive account containing documents to search
  • API keys from OpenAI and/or Google Gemini
  • Telegram or X (Twitter) account for user communication

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 356
Downloads 180

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