SHEETS RAG
Triggered manually or by an app event. Connects Code, Condition, Google Sheets, PostgreSQL, Stop And Error. Place this in a separate workflow named: queryexecuter place this in a separate workflow named: get database schema Use a powerful LLM to correctly build the SQL queries, which will be identified from the get schema tool and then executed by the execute query tool.
Front matter
name: SHEETS RAG
description: Triggered manually or by an app event. Connects Code, Condition, Google Sheets, PostgreSQL, Stop And Error. Place this in a separate workflow named: ### query_executer place this in a separate workflow named: ### get database schema ## Use a powerful LLM to correctly build the SQL queries, which will be identified from the get schema tool and then executed by the execute query tool.
category: Automation
kind: Workflow
software: Code|Condition|Google Sheets|PostgreSQL|Stop And ErrorSHEETS RAG
Triggered manually or by an app event. Connects Code, Condition, Google Sheets, PostgreSQL, Stop And Error. Place this in a separate workflow named:
query_executer place this in a separate workflow named:
get database schema ## Use a powerful LLM to correctly build the SQL queries, which will be identified from the get schema tool and then executed by the execute query tool.
Steps
- create table query (code)
- create insertion query (code)
- Google Drive Trigger (googleDriveTrigger)
- execute_query_tool (noOp)
- Google Gemini Chat Model (noOp)
- get_postgres_schema (noOp)
- change_this (set)
- is not in database (if)
- table exists? (postgres)
- fetch sheet data (googleSheets)
- remove table (postgres)
- create table (postgres)
- perform insertion (postgres)
- Execute Workflow Trigger (executeWorkflowTrigger)
- Sticky Note (stickyNote)
- Sticky Note1 (stickyNote)
- When chat message received (noOp)
- response output (set)
- sql query executor (postgres)
- schema finder (postgres)
- schema to string (code)
- AI Agent With SQL Query Prompt (noOp)
- Sticky Note2 (stickyNote)
- Error Handler (stopAndError)
Import
Download the JSON from the GitHub source and import it in n8n (Workflows, Import from file).
Author: Zie619, n8n workflow collection. License: MIT.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The n8n workflow library holds 1,814 entries. Members can search all of them by meaning and read every one in full.