AI Agents

Connect Google Drive with Google Sheets

23 nodes 227 125 Automatic trigger
Download

Workflow Description

This automation monitors Google Drive for new files, uses Gemini AI to intelligently extract and analyze their content, then automatically organizes the extracted data into Google Sheets while maintaining detailed records in a Postgres database.

How it works

  1. 1.Monitor a designated Google Drive folder for new or modified files
  2. 2.Deploy Gemini AI agent to analyze file content and extract structured data
  3. 3.Format and insert extracted data directly into Google Sheets workbooks
  4. 4.Store processing logs and metadata records in Postgres database for audit trails

Use cases

  • Convert unstructured Drive documents into organized spreadsheet tables without manual intervention
  • Automatically categorize and tag file contents using AI analysis
  • Maintain a centralized audit log of all processed files for compliance and review

Requirements

  • Google account with administrative permissions for Drive and Sheets access
  • Active Gemini API key with proper authentication
  • Running Postgres database with network connectivity
  • Pre-configured Google Drive folder designated for monitoring

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 227
Downloads 125

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