Templates / AI agent to chat with Snowflake database

AI agent to chat with Snowflake database

Ready for 3.0

by Mark Shcherbakov ✓ · 3,864 views · created 2025-06-28 · Internal Wiki, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 20 nodes and runs when a chat message arrives (plus 2 other triggers). Along the way it connects OpenAI Chat Model and Snowflake.

How it runs

Trigger: When a chat message arrives (plus 2 other triggers).

  1. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 3 tools (DB Schema, Retrieve Data, Get table definition); memory: Simple Memory
  2. Execute SQL (Snowflake): run a query
  3. Snowflake: run a query
  4. Aggregate: combines items into one
  5. Return Error (Edit Fields (Set)): sets or maps fields
  6. Aggregate: combines items into one
  7. Error page (Edit Fields (Set)): sets 1 field: html
  8. If: checks a condition and branches into true / false
  9. Set HTML (Edit Fields (Set)): sets 1 field: html
  10. Respond to Webhook: sends the response back to the webhook caller

…plus 2 more steps. See the full node list below.

Services it uses

OpenAI Chat ModelSnowflake

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Rarely used nodes in this template: n8n-nodes-base.snowflakeTool

Nodes used (13)

From the author

Video Guide I prepared a detailed guide showcasing the process of building an AI agent that interacts with a Snowflake database using n8n. This setup enables conversational querying, secure execution of SQL queries, and dynamic report generation with rich…

Excerpt from Mark Shcherbakov's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.