AI Agents

Extract and Analyze Google Drive Documents with AI and Save Results to Sheets

26 nodes 219 139 Automatic trigger
Download

Workflow Description

Advanced workflow that retrieves documents from Google Drive, processes them with OpenAI models, splits text into indexable chunks, stores them in a vector database, interacts through an AI agent with memory, and automatically logs findings in Google Sheets for easy reference and tracking.

How it works

  1. 1.Load documents from specified Google Drive folder
  2. 2.Process and split text content into indexed segments
  3. 3.Convert segments into Pinecone vectors for semantic search
  4. 4.Route user queries through OpenAI-powered agent with persistent memory
  5. 5.Search documents and extract relevant answers from stored vectors
  6. 6.Record results and metadata into Google Sheets spreadsheet

Use cases

  • Process corporate contracts and reports with minimal manual effort
  • Build intelligent document search engine with automatic archiving
  • Summarize PDF and text files while maintaining searchable history

Requirements

  • Google account with access permissions to Drive and Sheets
  • OpenAI API key to power language model operations
  • Pinecone account for vector storage and semantic indexing

Service Value

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

Apps Used

OpenAI Google Drive Document Default Data Loader Text Splitter Vector Store Chat Trigger AI Agent Tool Memory Google Sheets

Details

Trigger Automatic trigger
Nodes 26
Apps 10
Views 219
Downloads 139

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

/

OpenAI Chat Model

OpenAI

#1

OpenAI Chat Model1

OpenAI

#2

Google Drive

Google Drive

#3

Get File Content

Google Drive

#4

Default Data Loader

Document Default Data Loader

#5

Character Text Splitter

Text Splitter Character Text Splitter

#6

Extract from File

Extract From File

#7

Embeddings OpenAI1

OpenAI

#8

Sticky Note1

Sticky Note

#9

Sticky Note2

Sticky Note

#10

Embeddings OpenAI2

OpenAI

#11

Vector Store Tool

Tool Vector Store

#12

Pinecone Vector Store1

Vector Store Pinecone

#13

Pinecone Vector Store

Vector Store Pinecone

#14

When chat message received

Chat Trigger

#15

Captures session id

Set

#16

RAG AI Agent

Agent

#17

SerpAPI

Tool Serp Api

#18

Zep

Memory Zep

#19

HTTP Request

HTTP Request

#20

Code

Code

#21

HTTP Request1

HTTP Request

#22

Code1

Code

#23

Code2

Code

#24

Google Sheets

Google Sheets

#25

Window Buffer Memory

Memory Buffer Window

#26