See llms.txt for all machine-readable content.

Back to Templates

Build a Google Drive document similarity database with Ollama and Postgres

Created by

Created by: Siddharth Gupta || siddharth
Siddharth Gupta

Last update

Last update 17 hours ago

Categories

Share


Quick overview

This workflow clears two PostgreSQL tables, then scans a specific Google Drive folder for files and prepares to download each document for processing.

How it works

  1. Starts by deleting the n8n_vectors table in PostgreSQL to remove existing vector data.
  2. Deletes the scraped_pages table in PostgreSQL to clear previously scraped page records.
  3. Lists all files in a specified Google Drive folder and returns each file’s ID, name, and webViewLink.
  4. Downloads each listed Google Drive document using its file ID so it can be used in downstream steps.

Setup

  1. Add PostgreSQL credentials with permission to delete tables, and confirm the public.n8n_vectors and public.scraped_pages tables match your environment.
  2. Add a Google Drive OAuth2 connection with access to the target folder and its files.
  3. Update the Google Drive folder URL/ID in the folder scan step to point to your source directory.