AI Agents

RAG workflow for company documents stored in Google Drive

18 nodes 240 121 Automatic trigger
Download

Workflow Description

An intelligent retrieval-augmented workflow that fetches company documents from Google Drive, segments them into manageable chunks, embeds them in Pinecone, and answers employee queries through a Gemini-powered AI agent with full context awareness.

How it works

  1. 1.Trigger the workflow when a user submits a question via chat interface or Google Drive
  2. 2.Retrieve and automatically load documents from the connected Google Drive folder
  3. 3.Segment text content into smaller chunks using recursive character splitting
  4. 4.Convert text chunks into vector embeddings using Gemini's embedding model
  5. 5.Query Pinecone vector store to find the most relevant document segments
  6. 6.Generate precise answers through an AI agent that combines retrieved context with Gemini's reasoning

Use cases

  • Enable instant answers to employee questions about company policies, procedures, and internal documentation
  • Reduce manual search time across thousands of files by automating document retrieval and relevance ranking
  • Support knowledge management by providing a conversational interface to company documentation

Requirements

  • Active access to company Google Drive with read permissions for target folders
  • API keys configured for Gemini embeddings, Pinecone vector database, and Google Drive integration
  • Company documents available in standard formats such as PDF, Word documents, or plain text files

Service Value

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

Apps Used

Vector Store Gemini Document Default Data Loader Text Splitter AI Agent Google Drive Memory Chat Trigger

Details

Trigger Automatic trigger
Nodes 18
Apps 8
Views 240
Downloads 121

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 (18)

/

Pinecone Vector Store

Vector Store Pinecone

#1

Embeddings Google Gemini

Gemini Model

#2

Default Data Loader

Document Default Data Loader

#3

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#4

AI Agent

Agent

#5

Vector Store Tool

Tool Vector Store

#6

Pinecone Vector Store (Retrieval)

Vector Store Pinecone

#7

Embeddings Google Gemini (retrieval)

Gemini Model

#8

Download File From Google Drive

Google Drive

#9

Sticky Note2

Sticky Note

#10

Google Drive File Updated

Google Drive Trigger

#11

Google Drive File Created

Google Drive Trigger

#12

Window Buffer Memory

Memory Buffer Window

#13

When chat message received

Chat Trigger

#14

Sticky Note

Sticky Note

#15

Google Gemini Chat Model

Gemini Model

#16

Google Gemini Chat Model (retrieval)

Gemini Model

#17

Sticky Note1

Sticky Note

#18