# Chatbot for SQL queries on Google Sheets data without knowing SQL
This workflow enables non-technical users to retrieve data from Google Sheets via chat using natural language instead of SQL. Data is automatically synced to PostgreSQL, where a LangChain agent powered by Google Gemini analyzes the schema, constructs and executes SQL queries, and returns results in plain language.
## Who it´s for
- Analysts who need fast access to spreadsheet data without writing SQL.
- Managers requesting business metrics via chat.
- Developers automating table-to-database sync.
- Startup founders building internal analytics tools.
## What the automation does
- On Google Drive file update, imports data into PostgreSQL with correct typing (dates, currencies, numbers).
- On receiving a chat message, triggers a LangChain agent using Google Gemini.
- The agent inspects the DB schema, builds and runs a valid SQL query.
- Results are converted into natural language and sent back to the chat.
- Supports dynamic table creation and parsing of complex formats (MM/DD/YYYY, RUB, %).
## What´s included
- Ready-to-use n8n workflow.
- Trigger logic: Google Drive file change and incoming chat message.
- Integrations with Google Sheets, Google Drive, PostgreSQL, and Google Gemini.
- Basic text instructions for setup and adaptation.
## Requirements for setup
- Google account with access to Google Drive and Google Sheets API.
- PostgreSQL instance (local or cloud) with permissions to create tables and run queries.
- n8n instance with external node support.
- Google Gemini API key.
## Benefits and outcomes
- Saves analysts time on routine data requests.
- Enables non-technical staff to access data independently.
- Automatic synchronization between source and database.
- Unified chat interface for all query types.
- Reduces errors from manual SQL writing.
- Handles flexible typing and localized data formats.
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet