Automated Inventory Depletion and Low-Stock Slack AlertsAutomated Inventory Depletion and Low-Stock Slack Alerts
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
This project solves a common small-business pain point: inventory running out silently because no one's watching stock levels in real time.
Trigger 1 — Order processing: A webhook receives new orders (supporting multiple items per order). Each item is split out individually, matched to its corresponding row in a Google Sheets inventory log by SKU, and the stock count is automatically decremented — with the "Last Updated" timestamp refreshed on every change.
Trigger 2 — Daily stock monitoring: A scheduled trigger runs once a day, scans the entire inventory sheet, and checks every item's current stock against its own custom reorder threshold. Any item running low automatically triggers a Slack alert listing the item name, SKU, current stock, and threshold — so restocking decisions happen before a customer ever notices a shortage.
Kapil's avatar
I'd test two orders hitting the same SKU at once, since both can read the same stock count before either writes back to Sheets. Are you serializing stock updates per SKU, or using another way to prevent a lost decrement?
Zoha's avatar
Good catch — you're right that two simultaneous orders for the same SKU could cause a lost update under the original design (read-then-write race condition).
I've since reworked the stock logic: instead of directly overwriting the stock count, new orders now get appended to a...
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started