Connect Google Drive with Google Sheets
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.Monitor a designated Google Drive folder for new or modified files
- 2.Deploy Gemini AI agent to analyze file content and extract structured data
- 3.Format and insert extracted data directly into Google Sheets workbooks
- 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
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (23)
create table query
Code
create insertion query
Code
Google Drive Trigger
Google Drive Trigger
execute_query_tool
Tool Workflow
Google Gemini Chat Model
Gemini Model
get_postgres_schema
Tool Workflow
change_this
Set
is not in database
If
table exists?
Postgres
fetch sheet data
Google Sheets
remove table
Postgres
create table
Postgres
perform insertion
Postgres
Execute Workflow Trigger
Execute Workflow Trigger
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
When chat message received
Manual Chat Trigger
response output
Set
sql query executor
Postgres
schema finder
Postgres
schema to string
Code
AI Agent With SQL Query Prompt
Agent
Sticky Note2
Sticky Note