Files & Documents

Load Google Drive Documents into Vector Database

15 nodes 122 75 Automatic trigger
Download

Workflow Description

Automation that retrieves files from Google Drive, splits them into manageable text chunks, converts them to embeddings using OpenAI, and stores them in PostgreSQL for semantic search capabilities without requiring manual intervention.

How it works

  1. 1.Retrieve documents from specified Google Drive folder
  2. 2.Split content into optimized text segments using recursive character splitting
  3. 3.Generate vector embeddings via OpenAI API for each segment
  4. 4.Batch insert embeddings into PostgreSQL vector store

Use cases

  • Create semantic search engine for enterprise document repository
  • Build intelligent information retrieval system for uploaded files

Requirements

  • Connected Google Drive account with document access
  • OpenAI API key for embedding generation
  • PostgreSQL database with vector extension enabled

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 OpenAI Vector Store Split In Batches Google Drive

Details

Trigger Automatic trigger
Nodes 15
Apps 6
Views 122
Downloads 75

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

/

Default Data Loader

Document Default Data Loader

#1

Recursive Character Text Splitter

Text Splitter Recursive Character Text Splitter

#2

Embeddings OpenAI

OpenAI

#3

Postgres PGVector Store

Vector Store P G Vector

#4

When clicking ‘Test workflow’

Manual Trigger

#5

Loop Over Items

Split In Batches

#6

Move File

Google Drive

#7

Download File

Google Drive

#8

Search Folder

Google Drive

#9

Schedule Trigger

Schedule Trigger

#10

Sticky Note

Sticky Note

#11

Switch

Switch

#12

Extract from PDF

Extract From File

#13

Extract from Text

Extract From File

#14

Extract from JSON

Extract From File

#15