Daily MySQL low-stock restock digest in Slack and Asana

Every weekday at 7am, find low-stock SKUs in your MySQL inventory, file reorder tasks in Asana for the right buyer, and post one ranked digest in Slack.

Agentic Task
MySQLAsanaSlack BotOperationsNotifications & AlertsDaily DigestsData Sync
PromptCreate

Build me an agent workflow that runs every weekday at 7am in my local time zone and sweeps my MySQL inventory for restock work, then files real tasks in Asana and posts one ranked digest in Slack.

Trigger: cron, every Monday through Friday at 7am local.

Step 1, pull at-risk SKUs from MySQL. Use the MySQL Custom Query operation. Join my inventory table to the last 14 days of order line items so the agent can compute days-of-cover per SKU (on-hand quantity divided by average daily units sold over the trailing 14 days). Filter to SKUs where on-hand quantity is below the reorder point, or days-of-cover is under 7 days. For each row, also return the supplier name, the buyer or owner named on the supplier row, the trailing 30 days of revenue for that SKU, the on-hand quantity, the reorder point, and the calculated days-of-cover. I will tell you my exact table and column names when wiring this up, so write the query against placeholders like inventory, order_line_items, and suppliers, with sensible joins on sku and supplier_id.

Step 2, rank the results. In the agent step, score each at-risk SKU by how soon it will stock out, weighted by its share of the last 30 days of revenue across all at-risk SKUs. Sort descending. This is the list the rest of the workflow acts on.

Step 3, file Asana tasks for the top items. For each SKU near the top of the ranking, use the Asana Create a Task operation in my Purchasing project. The task name should be something like "Restock SKU 12345 (Widget Co)". The task notes should include the SKU, supplier name, suggested reorder quantity (use a simple lead-time-times-velocity formula, round up to the supplier minimum if I provide one), current on-hand, reorder point, days-of-cover, and the trailing 30 days of revenue as velocity context. Set a due date a couple of business days out. Assign the task to the buyer named on the supplier row by matching their name or email to an Asana user. If the buyer cannot be matched, leave the task unassigned in the Purchasing project.

Step 4, post the digest in Slack. Use the Slack Bot Send a Message operation to post one message in #ops. The message should summarize how many SKUs were queued for restock today, list the top three SKUs inline with supplier, on-hand, days-of-cover, and reorder quantity, and link out to the Asana Purchasing project for the full list. If the at-risk list from step 1 is empty, do not skip the message. Post a one-line all-clear in the same channel instead, something like "Inventory check ran, no SKUs at risk today."

Keep the SQL safe: read-only SELECT, parameterized, no string interpolation of user input, LIMIT the result set so a runaway query cannot dump the whole catalog.

Tunables I want exposed at setup: the cron time and time zone, the days-of-cover threshold, the lead-time used for suggested reorder quantity, the Asana project to file tasks in, and the Slack channel for the digest.

What does this prompt do?

  • Runs a weekday morning sweep of your MySQL inventory and last two weeks of orders to flag any SKU where on-hand stock is below the reorder point or days-of-cover is under a week.
  • Ranks the at-risk SKUs by how soon they will stock out, weighted by recent revenue, so the items that actually matter rise to the top.
  • Files an Asana task in your Purchasing project for each top item with the SKU, supplier, suggested reorder quantity, velocity context, and a due date, assigned to the buyer named on the supplier row.
  • Posts one ranked digest in Slack with the top three SKUs inline and a link to the rest, or a one-line all-clear when nothing is at risk.

What do I need to use this?

  • A MySQL database with an inventory table and an orders or order line items table, plus a buyer or owner name on each supplier.
  • An Asana account with a Purchasing project (or any project you want the reorder tasks filed in).
  • A Slack workspace and the channel where the morning digest should land, like #ops or #purchasing.
  • A rough sense of your reorder point and days-of-cover threshold so the sweep matches how your team already thinks about restock.

How can I customize it?

  • Change the schedule, the days-of-cover threshold, or the revenue window the ranking uses if your business is more or less seasonal.
  • Point the Asana tasks at a different project, swap the assignee rule, or adjust the suggested reorder quantity formula to match your supplier minimums and lead times.
  • Move the digest to a different Slack channel, expand the inline preview past the top three SKUs, or silence the all-clear message on quiet days.

FAQs

Do I need a specific inventory schema for this to work?
No. You tell the workflow which tables hold your SKUs, orders, and suppliers, and which columns mean on-hand quantity, reorder point, supplier name, and buyer. As long as those concepts exist somewhere, the sweep can be wired up to your schema.
What if no SKUs are at risk on a given morning?
The workflow posts a one-line all-clear in Slack instead of going silent, so your team knows the check ran and inventory looks healthy. You can turn that off if you would rather only hear from it on action days.
Can it assign the Asana task to the right buyer automatically?
Yes. If your supplier table has a buyer or owner name, the workflow uses that to assign the reorder task. If a buyer is missing, the task is left unassigned in the Purchasing project so a manager can pick it up.
Will this work with a cloud-hosted MySQL like AWS RDS or PlanetScale?
Yes. The workflow connects through a managed MySQL connector. You provide the host, database, and a read-only user, and whitelist the platform IP from your cloud provider's networking settings.
How is this different from the Amazon FBA restock alert?
The FBA prompt pulls from Amazon Seller Central and only pings Slack. This one reads from your own MySQL inventory, so it works for custom warehouses, Shopify backends, and B2B distributors, and it also opens an Asana task per item so the work is actually assigned, not just announced.

Related templates

Review desk for portal forms your team still fills in by hand

Stage a batch of filings overnight, then approve each completed form from a screenshot before anything is ever submitted.

Kernel
Google Sheets
Slack Bot
App
Client-by-client cold email pipeline review for agencies

Pick a client and a date range to see sent, replies, meetings booked and the real deal value your cold email produced, campaign by campaign.

Instantly
HubSpot
Slack Bot
App
Audit what Intercom's Fin AI actually resolved before you pay

Review every conversation Fin closed as resolved, judge which ones actually stuck, and see what the gap is worth against your bill.

Intercom
Google Sheets
Slack Bot
App
One triage console for every Jira service desk queue

Merge your IT, HR and Facilities queues into one list ranked by SLA time left, then reply, change status and escalate without ever opening Jira.

Jira Service Management
Jira
Slack Bot
App
Run your Webflow site translations from one review desk

See every page's translation status at a glance, edit translations side by side with the English, and publish only what your team has actually approved.

Webflow
JigsawStack
Slack Bot
+1
App
Legal contract intake desk your teams use instead of email

One place for sales and ops to request an NDA or vendor agreement, watch its status, and let legal launch the contract in a single click.

Ironclad
Slack Bot
General Input Database
App

Stop firefighting stockouts every Monday morning.

Connect MySQL, Asana, and Slack once, and Geni runs the restock sweep before your team logs on.