AI Agents

Extract and analyze Google Drive documents with AI

22 nodes 334 154 Automatic trigger
Download

Workflow Description

An automation that receives questions via chat, loads documents from Google Drive, splits them into manageable chunks, converts them to vector embeddings, and searches a vector database to find relevant answers using OpenAI models.

How it works

  1. 1.Receive user query through ChatTrigger
  2. 2.Automatically load documents from Google Drive
  3. 3.Split text into smaller, processable chunks
  4. 4.Convert chunks to OpenAI embeddings
  5. 5.Search Pinecone vector store for matching context
  6. 6.Send context and query to OpenAI for intelligent response

Use cases

  • Answer questions about documents stored in your Google Drive
  • Index and analyze reports, PDFs, and business documents
  • Build a smart assistant that understands company knowledge bases
  • Search quickly for specific information across large file collections

Requirements

  • OpenAI API key with Embeddings and Chat Completion permissions
  • Google account with Google Drive access authorization
  • Active Pinecone project with configured vector index
  • OpenAI embedding model such as text-embedding-3-small

Service Value

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

Apps Used

OpenAI Document Default Data Loader Google Drive Chat Trigger Output Parser LLM Chain Vector Store Text Splitter

Details

Trigger Automatic trigger
Nodes 22
Apps 8
Views 334
Downloads 154

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

/

When clicking "Execute Workflow"

Manual Trigger

#1

Embeddings OpenAI

OpenAI

#2

Sticky Note

Sticky Note

#3

Default Data Loader

Document Default Data Loader

#4

Set file URL in Google Drive

Set

#5

Sticky Note2

Sticky Note

#6

Add in metadata

Code

#7

Download file

Google Drive

#8

Chat Trigger

Chat Trigger

#9

Prepare chunks

Code

#10

Embeddings OpenAI2

OpenAI

#11

OpenAI Chat Model

OpenAI

#12

Set max chunks to send to model

Set

#13

Structured Output Parser

Output Parser Structured

#14

Compose citations

Set

#15

Generate response

Set

#16

Sticky Note1

Sticky Note

#17

Answer the query based on chunks

LLM Chain

#18

Sticky Note4

Sticky Note

#19

Get top chunks matching query

Vector Store Pinecone

#20

Add to Pinecone vector store

Vector Store Pinecone

#21

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#22