MySQL and Slack: Hourly KPI Threshold Alert Template
An hourly workflow that runs a MySQL KPI query and posts a Slack alert only when the result crosses a threshold you set.
What It Builds
A Schedule trigger fires every hour and a MySQL Connector node in Direct mode runs your KPI query. A Condition node compares the returned value against your threshold, and only when it crosses does a Slack Connector node post a formatted alert to your chosen channel. Quiet hours stay quiet, so the channel only lights up when something needs attention.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every hour, queries my MySQL database for the current value of a KPI, and only when that value crosses a threshold I set, posts a Slack message to the #ops-alerts channel with the KPI name, the current value, and the threshold it crossed.
Connectors Used
- Schedule trigger - runs the workflow once an hour on a cron schedule.
- MySQL - runs your read-only KPI query against the database.
- Slack - posts the threshold alert to a channel.
Customize It
Change the query to your own KPI (revenue, open tickets, failed payments), set the threshold number and whether it triggers above or below, and swap #ops-alerts for your channel. Adjust the schedule to every 15 minutes or only business hours by editing the cron expression in the trigger.
Tips
- Keep the MySQL query read-only and returning a single value so the Condition node has a clean number to compare.
- Use Direct mode on both connectors here: the query and the post are fixed, so you avoid AI cost.
- Set the Schedule trigger timezone to your own IANA zone so "hourly" lines up with your business day.