Natural language Google Sheets data analysis with Gemini AI
This n8n workflow template creates an efficient data analysis system that uses Google Gemini AI to interpret user questions about spreadsheet data and processes them through a specialized sub-workflow for optimized to...
Template notes
This n8n workflow template creates an efficient data analysis system that uses Google Gemini AI to interpret user questions about spreadsheet data and processes them through a specialized sub-workflow for optimized token usage and faster responses.
What This Workflow Does
- Smart Query Parsing: Uses Gemini AI to understand natural language questions about your data - Efficient Processing: Routes calculations through a dedicated sub-workflow to minimize token consumption - Structured Output: Automatically identifies the column, aggregation type, and grouping levels from user queries - Multiple Aggregation Types: Supports sum, average, count, count distinct, min, and max operations - Flexible Grouping: Can aggregate data by single or multiple dimensions - Token Optimization: Processes large datasets without overwhelming AI context limits
Tools Used
- Google Gemini Chat Model - Natural language query understanding and response formatting - Google Sheets Tool - Data access and column metadata extraction - Execute Workflow - Sub-workflow processing for data calculations - Structured Output Parser - Converts AI responses to actionable parameters - Memory Buffer Window - Basic conversation context management - Switch Node - Routes to appropriate aggregation method - Summarize Nodes - Performs various data aggregations
π MAIN WORKFLOW - Query Parser
What This Workflow Does The main workflow receives natural language questions from users and converts them into structured parameters that the sub-workflow can process. It uses Google Gemini AI to understand the intent and extract the necessary information.
Prerequisites for Main Workflow - Google Cloud Platform account with Gemini API access - Google account with access to Google Sheets - n8n instance (cloud or self-hosted)