Morning KPI digest from SQL Server to Slack

Every weekday at 8:33am, your database becomes a short executive briefing in Slack with the day's headline numbers, wins, regressions, and a watch list.

Agentic Task
SQL ServerSlackOperationsFinanceDaily DigestsAI ReportsNotifications & Alerts

Build me an agent workflow that posts a morning KPI digest from my Microsoft SQL Server database to a Slack channel every weekday.

Trigger: cron, weekdays (Mon to Fri) at 8:33am in my local timezone.

What the agent should do each run:

1. Run a small, configurable set of T-SQL aggregation queries against my SQL Server via the Custom Query operation. The queries should cover the metrics that matter for the business: at minimum daily revenue, new signups, active users, churn, top accounts by revenue, and any metric trending sharply day-over-day or week-over-week. Treat the query list as configuration so I can swap in my own.

2. For each KPI, compute the current value, yesterday's value, the same-weekday-last-week value, the absolute delta, and the percent change. The agent should do these comparisons itself rather than dumping raw query rows into Slack.

3. Classify each KPI as a win (moved sharply in the good direction), a regression (moved sharply in the bad direction based on whether higher or lower is better for that metric), or steady. Flag anomalies that exceed a configurable threshold (default plus or minus 20 percent day-over-day, or plus or minus 15 percent week-over-week).

4. Write a short executive-style narrative (2 to 4 sentences) summarizing the state of the business. Call out wins, regressions, and anomalies worth investigating. No fluff, no filler.

5. Post the digest to a Slack channel via the Send a Message operation. Structure the message as:

- Headline: the 3 to 5 most important KPIs with current value and percent change versus yesterday and last week.

- What changed: a bulleted list grouping wins and regressions with one-line context for each.

- Watch list: metrics moving in the wrong direction that the team should keep an eye on, with a hint at what to look at.

Use Slack mrkdwn formatting (single asterisks for bold, underscores for italics) and short lines so it reads well on mobile.

Configuration the user should be able to edit without touching code:

- The list of KPI queries: name, T-SQL, unit (dollars, count, percent), direction (higher is better or lower is better), and optional comparison period override.

- Anomaly thresholds: percent day-over-day and percent week-over-week.

- Target Slack channel.

- Cron time and timezone.

- Optional top-accounts query for a movers section.

Error handling: if a query fails or returns no rows, the agent should note that in the digest (for example, 'Active users query returned no data') rather than skipping silently or breaking the whole post.

Integrations: SQL Server (Custom Query) and Slack (Send a Message).

Additional information

What does this prompt do?
  • Runs your business KPI queries against your SQL Server first thing each weekday and pulls fresh numbers.
  • Compares every metric to yesterday and to the same day last week, then writes a short executive narrative.
  • Posts the digest to your chosen Slack channel with headline numbers up top, a 'what changed' section, and a watch list of metrics moving the wrong way.
  • Flags anomalies and sharp day-over-day or week-over-week swings worth a closer look so nothing important slips past.
What do I need to use this?
  • A Microsoft SQL Server database (self-hosted, Azure SQL, Amazon RDS, or Google Cloud SQL) with read access to the tables behind your KPIs.
  • A Slack workspace and the channel you want the digest posted to.
  • A short list of the metrics you care about and how to calculate them in T-SQL.
How can I customize it?
  • Change the send time, the timezone, or run it every day instead of weekdays.
  • Swap in your own list of KPI queries and edit names, units, or sort order so the digest reads the way your leadership talks.
  • Tune the thresholds that decide what counts as an anomaly so the watch list matches your team's tolerance for noise.
  • Point it at a different Slack channel, or fan it out to multiple channels for different audiences.

Frequently asked questions

Can I use my own metrics?
Yes. The digest is built around a list of queries you can edit. Add, remove, or rename anything, and the narrative adapts to whatever you put in.
Does this work with Azure SQL or Amazon RDS?
Yes. Anywhere your SQL Server is reachable over the network works, including Azure SQL Database, Amazon RDS, Google Cloud SQL, and self-hosted instances.
Will it post to a private Slack channel?
Yes, as long as the connected Slack account is a member of that channel.
How does it decide what counts as a regression?
You set the thresholds. By default it compares each metric to yesterday and the same weekday last week, and flags anything moving sharply in the wrong direction.
Can I include a top-accounts breakdown?
Yes. Add a query for your top accounts (by revenue, usage, or any field), and the agent will weave the standout names into the narrative.

Read the business in five minutes, before the day starts.

Connect SQL Server and Slack once, and Geni runs a fresh executive digest every weekday at 8:33am in your timezone.