Chat with your Postgres database
Natural-language questions become safe SQL, get executed, and come back as readable answers + tables.
The workflow at a glance
How this workflow works, step by step
- 1 Trigger Question
A chat message starts the flow. Carly hands the message into the next step as context.
- 2 LLM Write SQL
An LLM step does the thinking: write sql. Carly picks the right model for the job and you can swap models per step if you need to.
- 3 Tool Run query
Carly pulls live data from the connected tool — "Run query." Whatever's needed for the next step is fetched fresh, not cached.
- 4 LLM Explain result
An LLM step does the thinking: explain result. Carly picks the right model for the job and you can swap models per step if you need to.
When to use this template
- You want this work to happen consistently without anyone remembering to do it.
- You're already using tools Carly connects to, and the manual version of this is eating real minutes a week.
- You want a visible canvas you can audit and edit — not a black-box agent doing things you can't see.
When not to use it
- This task only happens once or twice a month — the setup cost won't pay back.
- The decision in the middle of the flow needs human judgment every single time, not just on edge cases.
- Your stack doesn't include any of the apps above and you don't want to wire a generic HTTP step.
Build it in 10 minutes — copy this prompt
Paste this in an email to and Carly will build the workflow for you.
Hey Carly — please build me this workflow. Name: Chat with your Postgres database What it should do: Natural-language questions become safe SQL, get executed, and come back as readable answers + tables. Steps: 1. Trigger: Question (chat) 2. LLM: Write SQL 3. Tool: Run query (Postgres) 4. LLM: Explain result Tools to wire up: (your call — pick the right ones) Set it live once you've got it working. Thanks!
Questions teams ask before building this
How long does this workflow take to set up?
Most teams have "Chat with your Postgres database" running in under 10 minutes. Copy the prompt on this page into an email to carly@usecarly.com and Carly wires the workflow together for you, including authenticating the tools you need.
Can I edit this template after Carly builds it?
Yes. Every workflow lives on the Carly canvas where you can rename steps, change conditions, swap LLM models, add filters, and re-route branches. Templates are starting points, not locked recipes.
What if I use a different tool than the ones in this template?
Carly connects to 200+ tools, plus a generic HTTP node for any API that doesn't have a native integration. Tell Carly your stack when you send the prompt and she'll pick the right connectors.
Does this run automatically once it's built?
Yes. The trigger at the start of the workflow fires automatically — on a schedule, on an inbound email, on a webhook, on a calendar event, whatever this template specifies. Carly handles the listening; you only step in when a step is gated on you.
Ready to run Chat with your Postgres database?
Carly will build it for you and you'll be up and running in 10 minutes.
Build it in Carly