π TablesToAgentic RAG - Convert Spreadsheets into Smart Conversational AI Agents - n8n workflow
Transform your Google Drive spreadsheets and Microsoft Excel files into intelligent, queryable knowledge with this powerful n8n workflow.
TablesToAgenticRAG automatically monitors your Google Drive folders, processes tabular data (Excel/CSV files), converts them into vector embeddings for advanced retrieval augmented generation (RAG) applications, and enables SQL querying capabilities for analytical operations on your spreadsheet data.
π Key Features
- Spreadsheet Processing: Automatically detects and processes Excel (.xlsx) and CSV files, extracting both content and schema information for intelligent querying
- Smart Schema Detection: Captures column structures from your spreadsheets, enabling the AI agent to understand your data format and generate accurate SQL queries
- Dual Query Capabilities: Combines semantic search through vector embeddings with precise SQL queries for numerical analysis and data aggregation
- Intelligent Update Detection: Automatically removes outdated embeddings, and regenerates vector embeddings only when files have been genuinely modified
- Smart Deletion Handling: Automatically removes embeddings and row data when files are moved to recycle bin
- Tabular Data Storage: Stores individual spreadsheet rows as JSONB for flexible SQL querying and analytical operations
π‘ Use Cases
- Business Intelligence & Analytics: Transform spreadsheets into AI-powered analytics assistants that can answer complex questions about sales data, financial metrics, and performance indicators using both natural language and SQL queries
- Data Analysis Automation: Create intelligent systems that can perform aggregations, comparisons, and trend analysis on your spreadsheet data without manual SQL writing
- Financial Reporting: Convert financial spreadsheets into queryable knowledge bases for instant insights on revenue, expenses, budgets, and forecasts with both semantic understanding and precise calculations
- Inventory Management: Process inventory spreadsheets to create AI assistants that can track stock levels, identify trends, and answer supply chain questions through natural language
- HR Analytics: Transform employee data spreadsheets into intelligent systems for workforce analytics, compensation analysis, and organizational insights while maintaining data privacy
- Research Data Management: Convert research datasets into queryable systems that support both exploratory questions and precise statistical queries
βοΈ Requirements
- n8n instance (cloud or self-hosted)
- Google Drive account
- OpenAI API key
- PostgreSQL database with pgvector extension (or Supabase account)
π§ Easy Setup
The workflow comes with comprehensive documentation that guides you through:
- Setting up n8n (both local and cloud deployment options)
- Installing and configuring required credentials (Google Drive, OpenAI, PostgreSQL/Supabase)
- Configuring Google Drive folder monitoring for spreadsheet files
- Creating the necessary PostgreSQL tables with pgvector extension
- Setting up schema storage for intelligent SQL query generation
- Testing and verifying the workflow functionality
π¬ FAQ
Q: How does the system handle both RAG and SQL queries?
A: The AI agent intelligently chooses between semantic search (RAG) for general questions and SQL queries for analytical operations like sums, averages, or data filtering based on your question type.
Q: Can it process large spreadsheets?
A: Yes! The workflow efficiently processes spreadsheets by storing rows individually and creating optimized vector embeddings for semantic search while maintaining full SQL query capabilities.
Q: What types of analytical queries can I perform?
A: You can perform any SQL operation including aggregations (SUM, AVG, COUNT), filtering, grouping, joins between datasets, and complex analytical queries on your tabular data.
Q: Can I combine data from multiple spreadsheets?
A: Yes! Each spreadsheet is stored with a unique identifier, allowing the AI agent to perform cross-dataset queries and analysis when needed.
Q: Is the tabular data updated in real-time when spreadsheets are modified?
A: Yes, the workflow continuously monitors your Google Drive folders and automatically updates both vector embeddings and row data whenever spreadsheet changes occur, ensuring your analytical capabilities stay current.
π Support
Need assistance? Connect with me on Twitter/X @victor_explore and send a DM for:
- Personalized setup assistance with this workflow
- Custom workflow development for your specific analytical needs
Transform your spreadsheets into intelligent, queryable knowledge with TablesToAgenticRAG today!