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 & AnalyticsEvent Analytics to ClickHouseInsert events into ClickHouse and run a scheduled aggregate report — CRUD plus raw SQL over OLAP tables.
- 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.
- Data & AnalyticsDeterministic MCP Catalog LookupCall one known MCP search tool directly from a workflow without an LLM choosing the tool.
- Data & AnalyticsInventory Allocation Conflict AgentCompare warehouse, marketplace, and preorder inventory feeds, then route allocation conflicts before oversells hit customers.
- Customer SupportHITL Support Reply AgentDraft a customer-facing support response, pause for human approval, then continue with the reviewed reply.
- Dev & IT OpsCodex PR Fix AgentSend a coding task to Codex, open a draft PR when it succeeds, and notify Slack when Codex needs follow-up input.
- Dev & IT OpsOpenCode Go PR Fix AgentSend a coding task to OpenCode Go, open a review-ready pull request, and return the implementation result.