AI Agents

Extract and analyze Drive documents, organize them in Sheets

88 nodes 305 148 Automatic trigger
Download

Workflow Description

An automation that retrieves documents from Google Drive, analyzes them with Gemini AI, removes duplicates, and automatically stores results in Google Sheets. Enables rapid review and searchability of large document collections.

How it works

  1. 1.Trigger automation manually or via HTTP request
  2. 2.Load documents from Google Drive and split into text chunks
  3. 3.Analyze and classify texts using Gemini, extract key information
  4. 4.Generate vector embeddings and store in Qdrant vector database
  5. 5.Remove duplicate records from results
  6. 6.Write clean data to Google Sheets for review

Use cases

  • Process hundreds of legal documents and organize content in structured tables
  • Analyze customer reports from Drive and auto-categorize by priority
  • Monitor Twitter/X posts, extract insights, and document findings in Sheets
  • Index large content collections and make them searchable via vector search

Requirements

  • Connected Google accounts (Sheets, Drive, and Gemini API access)
  • Source documents in Google Drive (text or PDF formats)
  • Qdrant or external Vector Store configured for document embeddings

Service Value

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

Apps Used

Text Splitter Document Default Data Loader Twitter/X Gemini Split In Batches If Vector Store Remove Duplicates Google Sheets Google Drive

Details

Trigger Automatic trigger
Nodes 88
Apps 10
Views 305
Downloads 148

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

/

When clicking ‘Test workflow’

Manual Trigger

#1

Web Search For API Schema

HTTP Request

#2

Scrape Webpage Contents

HTTP Request

#3

Results to List

Split Out

#4

Recursive Character Text Splitter1

Text Splitter Recursive Character Text Splitter

#5

Content Chunking @ 50k Chars

Set

#6

Split Out Chunks

Split Out

#7

Default Data Loader

Document Default Data Loader

#8

Set Embedding Variables

Set

#9

Execute Workflow Trigger

Execute Workflow Trigger

#10

Execution Data

Execution Data

#11

EventRouter

Switch

#12

Google Gemini Chat Model

Gemini Model

#13

Successful Runs

Filter

#14

For Each Document...

Split In Batches

#15

Embeddings Google Gemini

Gemini Model

#16

Has API Documentation?

If

#17

Store Document Embeddings

Vector Store Qdrant

#18

Embeddings Google Gemini1

Gemini Model

#19

Google Gemini Chat Model1

Gemini Model

#20

Extract API Operations

Information Extractor

#21

Search in Relevant Docs

Vector Store Qdrant

#22

Wait

Wait

#23

Remove Dupes

Remove Duplicates

#24

Filter Results

Filter

#25

Research

Execute Workflow

#26

Has Results?

If

#27

Response Empty

Set

#28

Response OK

Set

#29

Combine Docs

Aggregate

#30

Template to List

Split Out

#31

Query Templates

Set

#32

Google Gemini Chat Model2

Gemini Model

#33

For Each Template...

Split In Batches

#34

Query & Docs

Set

#35

Identify Service Products

Information Extractor

#36

Extract API Templates

Set

#37

Embeddings Google Gemini2

Gemini Model

#38

Search in Relevant Docs1

Vector Store Qdrant

#39

Combine Docs1

Aggregate

#40

Query & Docs1

Set

#41

For Each Template...1

Split In Batches

#42

Merge Lists

Code

#43

Remove Duplicates

Remove Duplicates

#44

Append Row

Google Sheets

#45

Response OK1

Set

#46

Has Operations?

If

#47

Response Empty1

Set

#48

Research Pending

Google Sheets

#49

Research Result

Google Sheets

#50

Research Error

Google Sheets

#51

Extract Pending

Google Sheets

#52

Research Event

Set

#53

Extract Event

Set

#54

Extract

Execute Workflow

#55

Extract Result

Google Sheets

#56

Extract Error

Google Sheets

#57

Get API Operations

Google Sheets

#58

Contruct JSON Schema

Code

#59

Upload to Drive

Google Drive

#60

Set Upload Fields

Set

#61

Response OK2

Set

#62

Generate Event

Set

#63

Generate Pending

Google Sheets

#64

Generate

Execute Workflow

#65

Generate Error

Google Sheets

#66

Generate Result

Google Sheets

#67

Get All Extract

Google Sheets

#68

Get All Research

Google Sheets

#69

For Each Research...

Split In Batches

#70

For Each Extract...

Split In Batches

#71

Wait1

Wait

#72

All Research Done?

If

#73

All Extract Done?

If

#74

Get All Generate

Google Sheets

#75

All Generate Done?

If

#76

For Each Generate...

Split In Batches

#77

Wait2

Wait

#78

Has Results?1

If

#79

Response Scrape Error

Set

#80

Has Results?3

If

#81

Response No API Docs

Set

#82

Sticky Note

Sticky Note

#83

Sticky Note1

Sticky Note

#84

Sticky Note2

Sticky Note

#85

Sticky Note3

Sticky Note

#86

Sticky Note4

Sticky Note

#87

Sticky Note5

Sticky Note

#88