Makani Tech: Build. Automate. Evolve.

Low Stock Alert and Purchase Order with n8n + Claude (free workflow)

How to build a low stock alert that drafts the purchase order for you

FreeWorkflowBy Kishan Makani · updated 19 October 2026 · 7 min read

Shopify/Google SheetsClaudeSlackWhatsAppGmail

Downloads

  • Download the n8n workflow (JSON)

    low-stock-alert-purchase-order-n8n.json · n8n workflow · 18 steps · starts with Every morning at 8 · uses Google Sheets, Anthropic, Slack, WhatsApp, Gmail · 30 KB

    Import into n8n: Create Workflow, then the menu, then Import from File.

How to import it into n8n
  1. In n8n, create a new workflow.
  2. Open the ⋯ menu at the top right and choose Import from File, then pick the downloaded .json. (Or open the file, copy everything and paste it on the canvas.)
  3. Open each node with a warning and connect your own account: the file carries no passwords or keys.
  4. Run it once with Test workflow, check the result, then switch it to Active.

What it does

Every morning at 8 AM the workflow reads your Stock sheet and the purchase orders you have already sent. It turns text like '12 pcs' into numbers, works out how many days of stock are left, and picks out items at or below their reorder level that are not already on order. Low items are grouped by supplier. For each supplier, Claude drafts a short, polite WhatsApp purchase order with quantities and last rates, and flags anything that looks wrong. The PO comes to you in Slack. Only when you tap Send PO does it go to the supplier on WhatsApp, with an email copy, and get logged as Sent so it is never ordered twice.

Who it is for

Cafés, restaurants, pharmacies, retail shops and D2C brands that keep stock in a Google Sheet (or Shopify) and reorder from a handful of regular suppliers over WhatsApp.

What you need

  • An n8n account (n8n Cloud or self-hosted)
  • A Google Sheet with Stock and Purchase orders tabs
  • An Anthropic API key for Claude
  • A Slack workspace with a #purchase channel
  • A WhatsApp Business Cloud API number, plus an approved 'purchase_order' template for suppliers who have not messaged you in 24 hours
  • Gmail for the email copy

How the workflow runs, node by node

The slides show the same steps. Open the workflow in n8n and you will see a sticky note over each one.

Step 1 · Check stock every morning

At 8 AM n8n reads your Stock sheet and the purchase orders already sent. Text like '12 pcs' becomes a number, and days of stock left are worked out from average daily sales.

  • Every morning at 8: Runs every day at 8 AM (set your timezone to Asia/Kolkata in workflow settings).
  • Read open POs: Reads purchase orders already sent and not yet received, so the same items are never ordered twice. Always output data is on, so an empty tab is fine.
  • Read stock sheet: Reads every row of your Stock tab: SKU, Item, Unit, In stock, Reorder level, Reorder qty, Avg daily sales, Unit cost, Supplier, Supplier WhatsApp, Supplier email. Runs once.
  • Clean numbers: Turns '12 pcs' and '₹220' into numbers, works out days of stock left from average daily sales, and marks items that are already on an open PO.

Step 2 · Find what's running low

Anything at or below its reorder level that isn't already on order is picked out. Items are grouped by supplier, so each supplier gets one purchase order with its own PO number.

  • Low and not on order?: Keeps only items at or below their reorder level that are not already on order and have a supplier. Everything else stops here, before any AI cost.
  • Group by supplier: Groups low items by supplier, gives each group a PO number (PO-date-01), and adds up the total from reorder qty times unit cost.

Step 3 · Claude drafts each purchase order

One supplier at a time, Claude writes a short, polite WhatsApp PO with items, quantities and last rates, and asks for a delivery date. It flags anything odd and never changes your numbers.

  • One supplier at a time: Handles one supplier per loop, so each PO gets its own Claude draft and its own approval card.
  • Draft PO with Claude: Writes a short, polite WhatsApp PO for that supplier with items, quantities and last rates, asks for a delivery date, and flags anything odd. It never changes quantities.
  • Claude: Claude (claude-sonnet-5-5) at temperature 0.2, so answers stay consistent from run to run.
  • PO schema: Forces fixed fields (whatsapp_message, email_subject, flags, urgent), so the approval card is always complete.

Step 4 · You approve on Slack

The PO comes to Slack with the lines, the total and the exact WhatsApp text. Send PO sends it. Skip today logs it as skipped, and it comes back tomorrow if stock is still low.

  • Approve purchase order: Posts the PO to #purchase with lines, total, any flags and the exact WhatsApp text, then waits up to 6 hours for your tap.
  • Approved?: True only when you tapped Send PO. Skip today, or no answer in 6 hours, goes down the false path.
  • Log as skipped: Logs the PO as Skipped. Skipped items are not 'on order', so they come back tomorrow if stock is still low.

Step 5 · PO goes to the supplier

The supplier gets the PO on WhatsApp and a copy by email. It is logged as Sent, so the same items are not ordered twice. If WhatsApp fails you get an alert, and a one-line summary lands in Slack.

  • Send PO on WhatsApp: Sends the approved PO to the supplier's WhatsApp. Free text only works within 24 hours of their last message; otherwise use an approved 'purchase_order' template. Error output goes to the alert.
  • Email PO copy: Emails the same PO to the supplier for their records (or to your own inbox if the supplier has no email).
  • Log purchase order: Logs the PO as Sent with its SKUs. When the goods arrive, change Status to Received and those items can be reordered again.
  • Alert owner: Tells you in Slack if WhatsApp refused the PO (often the 24 hour rule), so an approved order is never silently lost.
  • Morning summary: When every supplier is done, posts one line to #purchase so you know the morning check ran.

Setup

  1. In n8n, create a new workflow, open the menu and choose Import from File, then pick the JSON file.
  2. Make a Google Sheet with a Stock tab (SKU, Item, Unit, In stock, Reorder level, Reorder qty, Avg daily sales, Unit cost, Supplier, Supplier WhatsApp, Supplier email) and a Purchase orders tab (PO Number, Date, Supplier, SKUs, Lines, Total, Status). Paste its URL in the four sheet nodes.
  3. Create an Anthropic credential on Claude and replace YOUR_BUSINESS and YOUR_NAME in Draft PO with Claude.
  4. Connect Slack on Approve purchase order, Alert owner and Morning summary.
  5. Connect WhatsApp on Send PO on WhatsApp and set your Phone number ID. Write supplier numbers with country code (91...).
  6. Connect Gmail on Email PO copy and replace YOUR_EMAIL with your own address.
  7. In workflow settings, set the timezone to Asia/Kolkata. Change the time in Every morning at 8 if you like.
  8. Set one item's In stock below its reorder level, click Execute workflow, approve the Slack card and check the supplier gets the message. Then activate.

How to customise it

  • Pull live stock from Shopify instead of a sheet: swap Read stock sheet for the Shopify node (products, inventory) and keep the rest.
  • Run twice a day (8 AM and 4 PM) for fast movers like milk, bread or medicines.
  • Add a 'Lead time days' column and reorder when days left is below lead time, not just below the level.
  • Send POs above a set amount to a partner for a second approval.
  • When the supplier replies on WhatsApp with a date, log it with a second workflow on the WhatsApp trigger.

Guardrails

No purchase order reaches a supplier until you tap Send PO in Slack.

  • No purchase order reaches a supplier until you tap Send PO. Skip, or no answer in 6 hours, sends nothing.
  • Claude is told never to change quantities or rates, or add items. It only writes the message and flags odd lines.
  • Items on an open PO are skipped, so a supplier never gets the same order twice.
  • Skipped POs are not marked as on order, so they come back tomorrow if stock is still low.
  • A failed WhatsApp send raises a Slack alert instead of failing silently.

Troubleshooting

  • Nothing is ever flagged as low. Check that In stock and Reorder level are numbers or text like '12 pcs', and that each row has a Supplier.
  • The same item is ordered again. Log purchase order writes the SKUs column. Read open POs looks for Status 'Sent'. Make sure you change it to Received only after delivery.
  • WhatsApp send fails with a 24 hour error. The supplier has not messaged you in 24 hours. Use an approved template message for POs.
  • The loop stops after the first supplier. Every path inside the loop (sent, skipped, alert) must connect back to One supplier at a time. Check none were removed.
  • Slack buttons do nothing. Send-and-wait needs n8n to be reachable from the internet and the workflow must be active.

Want the members-only resources too?

A free account unlocks them all, including the ones shared in DMs.

Create a free account