13th June 2025 - Workshop Recap – Chat-with-Postgres Workflow & Live Q&A

Workshop Recap – Chat-with-Postgres Workflow & Live Q&A

Video

See the original walkthrough here: Postgres Database Chat Assistant – Full Workflow Documentation

Workflow Highlights

  1. Chat Trigger – the standard n8n chat window was used as the entry point.
  2. AI Agent – OpenAI 4-mini model via OpenRouter for speed, low cost, and a large context window.
  3. Memory – simple “last-5-messages” history (can be swapped for vector memory if needed).
  4. Three core tools inside the agent
  • Get DB schema & tables
  • Get table definition
  • Create & run SQL query
  1. Demo database – Amazon-scraped HDD product table. Example queries: list tables, describe products, top 10 drives by price.
  2. Extensibility ideas
  • Swap Postgres for MySQL, Salesforce, or any connector n8n supports.
  • Replace the chat UI with Slack, Telegram, email, voice (Ultravox) or SMS.
  • Chain additional tools: send daily “top 5 SSD deals” by email, trigger calls, schedule reports, etc.

Key Q&A Takeaways

  • Best session time – the noon-to-1 pm slot suits most attendees.
  • Self-hosting & security – run n8n + Postgres behind your firewall or via Docker for regulated environments.
  • Scaling – proof-of-concepts handle thousands of daily calls; heavier loads may need queue tuning.
  • Model chaining – mix models (Anthropic for code, GPT-4-mini for reasoning) inside one agent.
  • Visualization – extract data first, then feed it to tools such as Grafana or Superset.
  • Next sessions – submit questions in advance to shape the live Q&A; more teardown requests welcome.

Demo Glitch Explained
The public chat link failed because the workflow was not activated – rookie mistake. Activate the workflow first, then “Share Link” to create a public chat URL. The link can be password protected and supports optional login.

Resources & Next Steps

  • Full step-by-step JSON and notes are posted in the AI Never Sleeps community forum.
  • Detailed write-up lands on Substack every Friday.
  • Want a sandbox database to experiment? Ping me and I’ll grant access.

Get involved
Explore the JSON, connect your own database, and post results in the community thread. If you hit roadblocks, share screenshots or logs and we can troubleshoot together.