See llms.txt for all machine-readable content.

Back to Templates

Send low-stock Shopify reorder alerts with Google Sheets, Slack and Gmail

Quick overview

Calculates a statistical reorder point for every tracked Shopify variant each weekday, from 30 days of real order demand and per-SKU lead times kept in Google Sheets. Then it posts SKUs that need ordering to Slack and emails a reorder table with suggested quantities.

How it works

  1. A schedule trigger runs every weekday at 07:00.
  2. A settings node holds the defaults: recipient, service level, default lead time, demand lookback and order cover days.
  3. Optional per-SKU parameters are read from a Google Sheet: lead time, lead-time variability, service level, safety-stock override, on-order quantity, MOQ, case pack and supplier.
  4. All products and variants, plus the orders from the lookback window, are pulled from Shopify. Cancelled and test orders are ignored.
  5. A Code node builds a daily demand series per variant. It calculates safety stock as z × √(LT × σd² + d² × σLT²), the reorder point as d × LT + safety stock, and a suggested order quantity rounded up to MOQ and case pack.
  6. If any SKU is at or below its reorder point, the workflow posts a Slack summary and sends an HTML email table. Otherwise it ends quietly.

Setup

  1. In Shopify admin, create a custom app with read_products, read_inventory and read_orders. Install it and add a Shopify Access Token credential in n8n.
  2. Create a Google Sheet with the header row: sku, lead_time_days, lead_time_sd_days, service_level, safety_stock_override, on_order, moq, case_pack, supplier. Only sku is required. Connect Google Sheets and select the document and tab in Read SKU reorder settings.
  3. Connect Slack and set the channel in Post alert to Slack. Connect Gmail.
  4. In Set alert settings, replace YOUR_PURCHASING_EMAIL with the recipient address, adjust the defaults, then run the workflow once.

Requirements

  • A Shopify store with inventory tracking enabled, plus a custom-app access token
  • A Google account (Sheets and Gmail)
  • A Slack workspace

Customization

  • Change the schedule (cron) or demand_lookback_days. Shopify returns only 60 days of orders unless the app has read_all_orders.
  • Set only_skus_in_sheet to true to monitor only the SKUs listed in the sheet.
  • WooCommerce: replace the two Shopify nodes with WooCommerce "Get many products / orders" and map stock_quantity to inventory_quantity.
  • Swap Gmail for the Send Email (SMTP) node or Microsoft Outlook.

Additional info

  • Alerts repeat on each run until stock arrives. To stop them, add incoming POs to the on_order column.
  • Variants without a SKU, or not tracked by Shopify, are skipped.