Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. When a stock count changes in Square, Square tells ClickRuntime straight away.

  2. ClickRuntime checks whether the item has dropped below 5 and, if so, looks up its name.

  3. 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

RunsThe moment it happens
Get a Slack alert when Square stock runs lowjust nowSucceeded
Slack · #inventoryLow stock: *Cold brew concentrate 1L* at Northwind Café Main St: 3 left

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
low_inventory_alert.pyexample
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?
Yes. A fast seller may need an alert at 20 units, while a specialty item may need one at 2. Each threshold is set per item or per category, so alerts match the pace of the product.
Does it work with several locations?
Square tracks inventory by location, and the alert can name the location where the count dropped. A shop with three branches therefore knows which one needs restocking, and not only that the company is short.
Will it keep alerting while stock stays low?
It posts when the count crosses the threshold downward, and then stays quiet until the item is restocked and falls again. This avoids a message for every sale of an item that is already low.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.