Weekday low-stock restock report for Shopify

Every weekday at 7am ET, log your low-stock Shopify SKUs to a Google Sheets tracker and post the most urgent ones to Slack with a days-of-cover estimate.

Deterministic Code
ShopifyGoogle SheetsSlackOperationsDaily DigestsNotifications & AlertsData Sync

Build a code workflow that produces a low-stock restock report for my Shopify store every weekday morning and delivers it to a Google Sheets tracker plus a Slack summary.

Trigger: cron, every weekday (Monday through Friday) at 7am America/New_York.

Inputs I should be able to configure: the low-stock threshold (default 10 units), the lookback window for sales velocity (default 30 days), the Google Sheets spreadsheet ID and tab name for the restock tracker, the Slack channel for the morning summary, and how many items to include in the Slack top list (default 10).

Steps:

1. Call Shopify List Inventory Levels to pull current quantities for every inventory item across every location in the store. Aggregate the per-location quantities so each inventory item has a single total on-hand number. Drop anything at or above the threshold and keep only the SKUs at or below it.

2. For the low-stock items, call Shopify List Products (and List Variants where needed) to attach product title, SKU, vendor, and price for each variant. If an inventory item does not map to a sellable variant (raw component, archived product), skip it.

3. Call Shopify List Orders for the last 30 days, filtered to paid and not cancelled, and aggregate units sold per SKU across all line items. Divide by 30 to get an average daily run rate. Compute days of cover for each low-stock SKU as current on-hand divided by daily run rate. If the daily run rate is zero, mark days of cover as "no recent sales" rather than dividing by zero.

4. Sort the low-stock list by days of cover ascending (most urgent first).

5. Append one row per low-stock SKU to the Google Sheets tracker using Append Values. Columns: run date, product title, SKU, vendor, price, on-hand units, 30-day units sold, daily run rate, days of cover.

6. Post a Slack Send a Message to the configured channel with a short header (date and total count of low-stock SKUs), then the top 10 most-urgent items as a bullet list showing product title, SKU, on-hand, and days of cover. End with a link to the Google Sheet.

If the low-stock list is empty for the day, still post a one-line Slack message saying everything is above threshold and skip the sheet append.

Three integrations: Shopify (List Inventory Levels, List Products, List Variants, List Orders), Google Sheets (Append Values), Slack (Send a Message). The pipeline is fully deterministic, no judgement step.

Additional information

What does this prompt do?
  • Checks every Shopify SKU across your locations each weekday morning and flags the ones at or below your restock threshold.
  • Looks at the last 30 days of orders so each item shows a days-of-cover number, not just a raw stock count.
  • Adds one row per low-stock item to a Google Sheets tracker with title, SKU, vendor, price, current stock, and days of cover.
  • Posts a short Slack summary to your operations channel with the top 10 most-urgent items and a link back to the sheet.
What do I need to use this?
  • A Shopify store with admin access so the workflow can read inventory, products, and orders.
  • A Google account with edit access to the Sheet you want to use as your restock tracker.
  • A Slack workspace and the channel where your operations team wants the morning summary.
How can I customize it?
  • Change the threshold (default 10 units) so each SKU is flagged at the level your team treats as low.
  • Move the run time or skip weekends entirely, for example 6am ET Monday to Friday or once a week on Mondays.
  • Point the report at a different Sheet, a different Slack channel, or trim the Slack summary to more or fewer items.

Frequently asked questions

Does this work if I sell from more than one Shopify location?
Yes. The workflow pulls inventory levels across all of your store's locations, so warehouse, retail, and 3PL stock are all included in the low-stock check.
What is days of cover and why is it better than a fixed threshold?
Days of cover is your current stock divided by your recent daily sales rate. A SKU with 20 units that sells 10 a day is more urgent than a SKU with 20 units that sells once a week, even though both are above any simple threshold.
How is the daily sales rate calculated?
We look at the last 30 days of paid Shopify orders and total the units sold per SKU, then divide by 30 to get an average daily run rate. You can change the lookback window when you set the workflow up.
Will the Google Sheet get cluttered over time?
Each run appends a fresh batch of rows with the date, so the sheet doubles as a history of which items hit low stock when. You can add filters or a pivot in the sheet without changing the workflow.
Can I send the Slack summary to more than one channel?
Yes. Duplicate the Slack step in the editor and point each copy at a different channel, for example operations for the full list and a leadership channel for the top three.

Stop scrambling when a bestseller goes out of stock.

Connect Shopify, Google Sheets, and Slack once, and Geni runs this restock check every weekday morning.