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
PromptCreate

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.

Related templates

Weekend football matchday preview, posted to Slack

Every Friday, get a ready-to-read preview of your league's weekend matches, with positions, form, scorers to watch, and predicted results, posted to Slack.

API-Sports
Slack
Agentic Task
Weekly Braintree revenue and refund report for finance

Every Monday morning, finance leadership gets a clear recap of last week's Braintree sales, refunds, and disputes by email and Slack.

Braintree
Gmail
Slack
Agentic Task
Daily IP reputation screening with Slack threat alerts

Every morning we check your list of IP addresses for abusive activity, update your spreadsheet, and alert your team only about the risky ones.

AbuseIPDB
Google Sheets
Slack
Agentic Task
Turn Heroku deploys into a readable Slack changelog

Every time you ship to Heroku, we post a clear summary to Slack listing what changed, who deployed it, and whether it was a rollback.

Heroku
GitHub
Slack
Agentic Task
Morning team travel briefing with live flight alerts

Every weekday morning, your team gets one Slack briefing on who's flying today, their live flight status, and any delays or cancellations to act on.

AviationStack
Google Sheets
Slack
Agentic Task
Weekly self-audit of your company's IP address reputation

Every Monday we scan your office, VPN, mail, and hosting IP ranges for abuse reports, post a summary to Slack, and open a ticket when anything crosses your risk line.

AbuseIPDB
Slack
Jira
Agentic Task

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.