Skip to main content
Lifetime license included with every purchase

DataChat: Read-Only SQL Analyst for Slack

DataChat: Read-Only SQL Analyst for Slack ships as a ready-to-import n8n automation package: load the bundled workflow JSON, connect the credentials listed on this page, and activate it on self-hosted n8n or n8n Cloud.

Let your team ask the Postgres database questions in plain English from Slack — with a hard read-only gate, real schema grounding, and a full audit log.

  • Answer plain-English data questions in Slack with a single slash command, no SQL knowledge required
  • Ground every query in your live table and column list so the AI stops inventing tables that do not exist
  • Block every write: a quote-aware gate rejects anything but one plain SELECT, plus stacked statements, system catalogs, and file functions
  • Cap every result with a forced row limit and a server-side statement timeout so a careless question cannot hammer production
  • Hide sensitive tables and whole schemas from the assistant with a blocked-table list you control
  • Restrict access to your Slack workspace and, optionally, to a named list of users
  • Log every question, generated SQL, row count and outcome to Google Sheets for a complete audit trail
PostgresOpenAISlackGoogle Sheets
n8n / workflow / chat-with-postgres-analystActual workflow — not a mockup
Slack Slash Command — WebhookSlack Slash CommandWEBHOOKConfig — SetConfigSETParse Command — CodeParse CommandCODERequest Allowed? — IFRequest Allowed?IFFetch Schema — HTTP RequestFetch SchemaHTTP REQUESTBuild Schema Digest — CodeBuild Schema DigestCODEDraft SQL (AI) — OpenAIDraft SQL (AI)OPENAIGuard SQL — CodeGuard SQLCODESQL Approved? — IFSQL Approved?IFRun Query — HTTP RequestRun QueryHTTP REQUESTCollect Rows — CodeCollect RowsCODEQuery Succeeded? — IFQuery Succeeded?IFExplain Results (AI) — OpenAIExplain Results (A…OPENAIPrepare Reply — CodePrepare ReplyCODEPost Answer To Slack — SlackPost Answer To Sla…SLACKBuild Log Row — CodeBuild Log RowCODELog Query — Google SheetsLog QueryGOOGLE SHEETS
17 nodes · 19 connections · 1 trigger · 3 in-canvas notesExported from the workflow file you receive — scroll sideways to follow the full path.
One-time
$19
~10 min
setup time

Setup Serviceoptional live install and test. Choose your tier at checkout (not tied to this template's price).

Instant download after payment
Refund as per the Refund Policy for downloadable templates.
Email Support · 24h SLA
Lifetime updates

APIs required
PostgresOpenAISlackGoogle Sheets
Already purchased?
Download DataChat: Read-Only SQL Analyst for Slack

Paste the license key from your receipt. It must match this template.

How it works

Workflow summary

One workflow handles everything end-to-end.

  1. 1A teammate asks a question in Slack with a slash command and gets an instant acknowledgement
  2. 2Checks the question came from your workspace and, optionally, from someone on your allow-list
  3. 3Reads your database's live table and column list so the answer is grounded in your real schema
  4. 4AI drafts a single SQL query against that schema, never against a guess
  5. 5A read-only gate rejects anything that is not one plain SELECT, blocks system tables and sensitive tables, and forces a row limit
  6. 6Runs the approved query through a locked-down, timeout-protected database function
  7. 7AI explains the result in plain English and posts the answer, a formatted table, and the SQL back to the channel
  8. 8Logs every question, query, row count and outcome to a Google Sheets audit trail
Deliverables

What's included with your purchase

Every checkout includes the same practical package so you are never hunting for missing files mid-setup.

  • 01Workflow JSON exports ready to import into your n8n workspace (self-hosted or n8n Cloud).
  • 02Step-by-step guide that walks credential creation, node-by-node checks, and activation.
  • 03Credential checklist for Postgres, OpenAI, Slack, Google Sheets. Email support@n8ntemplatestore.com if you get stuck — replies within 24 hours (SLA).
  • 04Perpetual (lifetime) use license Your one-time purchase includes an ongoing right to use this template package on n8n instances you control for your own automation — not for resale or public redistribution of the files as a product. Terms & conditions.
  • 05We keep the copyright Workflow JSON, guides, screenshots, and bundled assets stay our copyrighted works (or our licensors'). Payment grants the limited license in our Terms only — it does not transfer ownership.

Need a second opinion before buying? Compare the full catalog, browse more Data Processing templates, see how n8n compares to Zapier and Make, or read the support policies.

Setup

Three steps to a running n8n automation

01

Import the workflow into n8n

02

Paste your API keys into the credentials panel

03

Press ‘activate’ — you’ll get your first report tomorrow morning

Support

Need help setting up this n8n template?

Beginner-friendly guidance is included. Our support team will help you if you get stuck — email support@n8ntemplatestore.com or visit support.

Email support
Replies within 24 hours (SLA)
Contact
Setup Service4 tiers — your choice
Optional live session — we install, configure, and test on a screen share. Add Setup Serviceat checkout and pick any tier; pricing is not tied to this template's list price.
Book setup
FAQ

About this template

How long does it take to set up DataChat: Read-Only SQL Analyst for Slack?
Most people finish in minutes following the guide. If you’ve never used n8n before, budget an hour — the first workflow is always the slowest.
What if I get stuck?
Email support@n8ntemplatestore.com. Free basic support is included with every purchase, and you’ll get a reply from our team within 24 hours. If setup needs more than email, we can schedule a call.
Do I need to pay for Postgres?
API costs are separate and go directly to the provider — typically a few dollars a month at most for a solo business. Full breakdown is in the setup guide.
Can I customize the workflow?
Yes, completely. You own the .json — edit nodes, swap in your own prompts, re-wire the logic. Our support team can help you plan customizations over email.
What if it doesn’t work for me?
Refunds are issued only as described in our Refund Policy (https://n8ntemplatestore.com/refund-policy). Or add Setup Service at checkout for a live install and test session — pick any tier you prefer.