Daily business KPI digest from MySQL to Slack

By General Input

Every weekday at 9am ET, get a plain-English KPI digest of signups, active users, revenue, and anomalies from your MySQL database, posted to a Slack channel.

Integrations

  • MySQL
  • Slack Bot

Type

Agentic Task

Categories

  • Operations
  • Product

Build me an agent workflow that runs on a cron schedule every weekday at 9am America/New_York and posts a business KPI digest from my MySQL database into a Slack channel.

Trigger: cron, weekdays 9am ET.

Tools the agent should use:

1) MySQL Custom Query — to run a small set of analytical SQL queries against my database. The agent must run these queries one at a time, not in a single multi-statement request.

2) Slack Bot Send a Message — to post the final digest as a single nicely formatted message to a channel I pick during setup.

Make the SQL queries configurable up front. During setup, the user should paste in their own table and column names for each metric. The default metric set the agent should ask for is: signups in the last 24 hours; active users this week vs last week (week-over-week); revenue this week vs last week; top 5 accounts by usage this week; anomaly flags where a metric has moved more than 20 percent against its trailing 7-day average.

Each metric is its own SQL query the user provides. Store them as workflow inputs so they can be edited later without rewriting the workflow.

Runtime behavior the agent must follow:

- Run each configured query via MySQL Custom Query, one at a time.

- If a query returns zero rows or an empty result, skip that metric and continue with the remaining metrics. Do not fail the whole run because one metric is empty.

- If a query returns an actual database error (bad column, syntax error, permission denied), note that metric as failed in the final digest but still post whatever other metrics succeeded.

- After collecting results, interpret the numbers in plain English. Compute the percentage change vs the comparison period where relevant (week-over-week for active users and revenue, vs trailing 7-day average for the anomaly check).

- Call out which metrics look healthy (growth, stable) versus which need attention (declines, anomalies past the 20 percent threshold).

Output format: one Slack message, posted with Slack Bot Send a Message to the channel configured during setup. Use Slack mrkdwn formatting: a bold header line with the date, then short sections for each metric. Each section should include the headline number, the comparison number, the percent change, and one sentence of interpretation. End with a Healthy vs Needs Attention summary at the bottom.

Keep the message scannable and under roughly 1500 characters. Avoid raw SQL or technical jargon in the Slack output. Do not paste tables of rows directly. Summarize.

Inputs to collect at setup time: MySQL credential, Slack Bot credential, target Slack channel ID or name, and the SQL for each metric the user wants included.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them