Alert your team in Slack before a product sells out
A scenario prompt that converts a described low-stock-to-Slack workflow into an exact trigger/threshold/action recipe, covering flash-sale spikes and multi-warehouse stock.
Works with Claude / GPT610 uses★ 4.2
The prompt
automation-low-stock-alert-to-slack
A store owner describes their process like this: "When a product's stock drops below
10 units, I want a message posted in our #inventory Slack channel with the product
name, current stock, and a link to restock it, so purchasing can reorder before we
run out."
AVAILABLE TOOLS: [WooCommerce (trigger), Uncanny Automator, Slack]
Turn this into an implementation-ready automation recipe, thinking through what the
plain description leaves ambiguous:
1. Trigger: the exact WooCommerce stock-change event to fire on, and whether it
should fire on every unit decrement (noisy during a flash sale) or only once when
the threshold is first crossed.
2. Conditions: state the exact logic for re-triggering. If stock goes from 9 back up
to 15 after a restock and then drops below 10 again, should a new alert fire, or
does the recipe need a "resolved" state to avoid alert fatigue.
3. Actions in order: format the Slack message with product name, SKU, current stock,
and a direct edit link, then decide whether variable products (size/color
variants) should alert per-variant or roll up to the parent product.
4. Failure handling: if the Slack API call fails or the channel is archived, should
the recipe fall back to an email to purchasing, and how would you detect that
fallback is needed.
5. One edge case specific to this exact workflow: a single flash-sale order that buys
15 units of the same item in one cart, dropping stock from 20 straight past the
threshold to 5 in one transaction. Confirm the alert still fires exactly once.
Replace the workflow description and available tools with your own.
The naive version of this recipe fires once per unit sold during a sale spike and
buries the actual alert under noise. Spelling out the “first crossing only” logic
before you build the recipe saves you from muting the whole channel later.
Pro tip: ask the model to also propose a daily digest fallback for slow-moving low
stock items that never spike, since those often get missed by threshold-only alerts.