AI Agents

Monitor Google Drive and Automatically Update Google Sheets with AI

23 nodes 310 145 Automatic trigger
Download

Workflow Description

An intelligent automation that watches a Google Drive folder, processes new and modified files through Gemini AI to extract key data, and seamlessly populates Google Sheets while storing records in Postgres for audit trails and advanced analytics.

How it works

  1. 1.Set up Google Drive monitoring to detect new or updated files
  2. 2.Process content through Gemini AI agent to identify and extract relevant data
  3. 3.Insert extracted data into Google Sheets and persist records in Postgres database

Use cases

  • Automatically organize incoming documents and index project data across teams
  • Consolidate invoices, reports, and forms into a single structured spreadsheet

Requirements

  • Active Google account with full access permissions to Drive and Sheets
  • Configured Postgres database with active connection credentials

Service Value

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

Apps Used

Google Drive Tool Gemini Postgres Google Sheets Twitter/X Manual Chat Trigger AI Agent

Details

Trigger Automatic trigger
Nodes 23
Apps 8
Views 310
Downloads 145

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

/

create table query

Code

#1

create insertion query

Code

#2

Google Drive Trigger

Google Drive Trigger

#3

execute_query_tool

Tool Workflow

#4

Google Gemini Chat Model

Gemini Model

#5

get_postgres_schema

Tool Workflow

#6

change_this

Set

#7

is not in database

If

#8

table exists?

Postgres

#9

fetch sheet data

Google Sheets

#10

remove table

Postgres

#11

create table

Postgres

#12

perform insertion

Postgres

#13

Execute Workflow Trigger

Execute Workflow Trigger

#14

Sticky Note

Sticky Note

#15

Sticky Note1

Sticky Note

#16

When chat message received

Manual Chat Trigger

#17

response output

Set

#18

sql query executor

Postgres

#19

schema finder

Postgres

#20

schema to string

Code

#21

AI Agent With SQL Query Prompt

Agent

#22

Sticky Note2

Sticky Note

#23