Slack + Postgres MCP Answer Agent
Answer Slack channel questions by letting an Agent query Postgres through MCP, then post the answer back to Slack.
The full canvas, before you import it
Click any node to see its config.
Click a node to select it — same as the Heym editor; the panel shows its settings.
4 nodes · Free & source-available
Slack + Postgres MCP Answer Agent
Turn a Slack channel into a database-aware assistant. A Slack Trigger receives the question, an Agent uses a configured Postgres MCP server to inspect approved tables and produce a concise answer, then a Slack node posts the response back to the channel.
What this workflow does
- Slack Trigger listens for new channel messages
- AnswerFromPostgres (Agent) receives the Slack text and has a Postgres MCP connection available as tools
- The Agent queries Postgres only through MCP, summarizes the result, and avoids inventing missing data
- SendChannelAnswer posts the final answer back to the same Slack channel
- AnswerLog returns the Slack send status for debugging
Use cases
- Internal support questions backed by product or CRM tables
- Ops questions such as "Which invoices are overdue?"
- Lightweight BI answers inside Slack without giving everyone database credentials
MCP and Agent setup
In the Agent node, replace the placeholder Postgres MCP connection with your real database URL. The sample URL follows Heym's .env.example defaults: postgres, postgres, localhost:6543, database heym. For production, use a read-only database user and keep secrets in your own Heym instance.
The Agent prompt is written as a Text-to-SQL workflow: understand the Slack question, generate a read-only SELECT, execute it with Postgres MCP tools, then show the SQL and results clearly.
How to import this template
- 1Click Import → Copy JSON on this page.
- 2Open your Heym and navigate to a workflow canvas.
- 3PressCmd+V/Ctrl+V— nodes appear instantly.
- 4Add your API keys in the node config panels and click Run.
Discover more automations
- Data & AnalyticsJSONPlaceholder User ProfileLoad a sample user record from JSONPlaceholder — handy for prototyping Set/Mapper nodes and mock APIs.
- Data & AnalyticsSet — Field RemapMap incoming text into named fields with the Set node before handing off to webhooks or databases.
- Data & AnalyticsGoogle Sheets AI EnricherRead new rows from Google Sheets, classify or enrich them with an LLM, and write the results back automatically.
- Data & AnalyticsGrist to BigQuery Sync LogRead qualified rows from Grist, stream them into BigQuery, and log the sync outcome in a Heym DataTable.
- Data & AnalyticsKPI Anomaly Slack WatchRead operational KPI rows from Google Sheets, detect unusual changes with AI, and notify Slack when action is needed.
- Data & AnalyticsCSV Stats Analyzer (Agent Skill)An agent runs a bundled Python skill that parses CSV text and returns per-column summary statistics — no API keys needed.
- Customer SupportHITL Support Reply AgentDraft a customer-facing support response, pause for human approval, then continue with the reviewed reply.
- Marketing & SEOReddit Subreddit GET Tool CallLet an Agent call a no-key HTTP GET tool that fetches hot posts from a subreddit JSON feed.
- AI AgentsBatch LLM Status TrackerSend an array through the OpenAI Batch API, branch on live status updates, and collect the final per-item results.
- Customer SupportIMAP Support Inbox TriageWatch a shared mailbox, summarize incoming support email, and route urgent messages to Slack.
- Document OpsJina Web FetcherFetch clean, LLM-ready text from any URL using the Jina Reader API.
- Dev & IT OpsCursor Post NotifierMonitor the Cursor blog on a schedule and Slack-notify your team when a new post goes live.