The moment it happens
Get a Slack alert when Square stock runs low
When an item's count falls below 5, a Slack message names the item, location and count left.
- Runs
- The moment it happens
- Apps
- Square
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: whenever a Square item's stock drops below 5, post the item name, location and remaining count to #inventory in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Square tracks quantities for every item, but the number only helps when someone looks at it. A bakery runs out of its best-selling sourdough by noon, a boutique sells its last size medium of a popular shirt on Saturday morning, and the manager discovers it on Monday. Customers who asked were told it was out, orders could not be filled, and the supplier call that would have helped was not made. Staff on the floor are not looking at stock levels while serving.
When Square reports a change to an item's inventory count, ClickRuntime receives the new count, compares it with the threshold you set for that item, and posts a message to Slack when stock has dropped to or below it. The post names the item and the quantity left, at the moment it happens.
Shops, bakeries and restaurants that sell physical goods with a limited supply use it to reorder in time.
What you get out of it
Reorders happen before the shelf is bare
A message when stock reaches your chosen level gives time to call the supplier or bake another batch. Waiting for the last item to sell leaves customers disappointed. Even a small bakery benefits, because ingredients and labor are planned ahead.
Best sellers stay available
The items that bring most revenue are the ones that hurt most when absent. Per-item thresholds make sure those items get attention first and promptly. Protecting those products protects the revenue that pays the other bills.
Staff on the floor can act
A message in a team channel reaches a manager or a stockroom worker immediately, even if they are away from the screen, so someone can top up the display during the day.
No stock checks are needed
Managers stop walking the shelves to check counts. The alert tells them only when something needs action, which leaves time for customers. Counting shelves is rarely a good use of a manager's time, and it is replaced by a message.
Stock patterns are recorded
Each alert is a dated message, so looking back reveals which items run low most often and how quickly, which helps in setting reorder points and quantities. The record also helps when negotiating delivery schedules with suppliers.
How it works
What happens, step by step
When a stock count changes in Square, Square tells ClickRuntime straight away.
ClickRuntime checks whether the item has dropped below 5 and, if so, looks up its name.
A message goes to your #inventory Slack channel with the item, the location and how many are left.
Before it runs live
- Connect Square
- Paste your automation's link into the other app's webhook settings
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Square steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, notify
API = "https://connect.squareup.com/v2"
def square_headers():
return {"Authorization": f"Bearer {credentials.secret('SQUARE_ACCESS_TOKEN')}", "Square-Version": "2024-10-17"}
THRESHOLD = 5
@on_event
def handle(event):
counts = event.json["data"]["object"]["inventory_counts"]
low = [c for c in counts if c["state"] == "IN_STOCK" and float(c["quantity"]) < THRESHOLD]
if not low:
return {"posted": 0}
h = square_headers()
for c in low:
variation = http.get(f"{API}/catalog/object/{c['catalog_object_id']}", headers=h,
params={"include_related_objects": "true"}).json()
item = next((o for o in variation.get("related_objects", []) if o["type"] == "ITEM"), None)
name = item["item_data"]["name"] if item else variation["object"]["item_variation_data"]["name"]
location = http.get(f"{API}/locations/{c['location_id']}", headers=h).json()["location"]["name"]
notify.slack(f"Low stock: *{name}* at {location}: {float(c['quantity']):g} left", channel="#inventory")
return {"posted": len(low)}FAQ
Common questions
Can each item have its own threshold?
Does it work with several locations?
Will it keep alerting while stock stays low?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get emailed about every Square refund
Each refund triggers an email with the amount, location and reason as soon as Square reports it.
See how it worksGet each location's Square sales after closing
A nightly email breaks down the day's Square sales per location with tips, fees and card versus cash.
See how it worksSee your top Square items and how today compares
A daily email names the three best-selling items and compares the day's total with the same weekday last week.
See how it worksKeep exploring
Set up “Get a Slack alert when Square stock runs low” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.