The flow
Starts it 1Model 3Logic 13Service 4
The steps in the order they run, from what starts it.
- 1Slack TriggerSlack triggerStarts it
- 2Extract Slack MessageSetLogic
- 3Load Table DefinitionsGoogle SheetsService
- 4Prepare Table ListCodeLogic
- 5Load Database SchemaPostgresService
- 6Build AI SchemaCodeLogic
- 7Generate SQLGoogle GeminiModel
- 8Parse LLM ResultCodeLogic
- 9Handle Failure ResponseSetLogic
- 10Validate LLM OutputCodeLogic
- 11Send Slack ReplySlackService
- 12SQL Valid?IfLogic
- 13Execute SQL QueryPostgresService
- 14Determine Failure CauseIfLogic
- 15Format Query ResultCodeLogic
- 16Output Creation(Gemini)Google GeminiModel
- 17Regenerate SQLGoogle GeminiModel
- 18Prepare Slack ResponseCodeLogic
- 19Parse AI Response (Retry)CodeLogic
- 20Validate SQL (Retry)CodeLogic
- 21SQL Valid? (Retry)IfLogic
How it's built
- Starts on
- An event in a connected app
- Steps
- 21, with 3 branches
- Size
- Large: read it before trusting it with anything live
- Connects to
- Google Sheets, Postgres, Slack
- Model
- Gemini
Questions
What does it need to run?
An n8n account, plus your own Google Sheets, Postgres and Slack accounts, and a key for Gemini. You connect your own accounts after importing it; none are included.
What starts it?
It starts on an event in a connected app.
Does it use AI?
Yes. It calls Gemini. Model calls are billed by the provider, not by n8n.
How long does it take to set up?
Take your time. At 21 steps it is large: read it before trusting it with anything live.
How do I import it?
Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.
Before you run itNothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 21 steps before you point it at anything that matters.