Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

Reorder inventory and track supplier confirmations with Sheets, Gmail and GPT-4 Mini

On a schedule, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets.

What it does

## Reorder stock on measured lead times and read supplier confirmations with Gmail, Sheets and AI ### How it works 1. The sheet is audited before anything is ordered from it: deliveries past their date, receipts booked short, and stock the count, receipts and sales do not explain. 2. Demand is measured per product over the days it was in stock. A week out of stock is not a week of no demand, and one bulk order is not the new normal. 3. Lead time is the 80th percentile of your receipts, one sample per delivery, not per line, or the quoted figure when history is thin. 4. The reorder point covers demand over that lead time plus the review period, with safety stock for how much both of them vary. Goods already on order count against it. 5. One purchase order per supplier, rounded to their minimum and pack size, capped by shelf life, and held under their minimum order value unless a line runs out first. 6. Confirmations are read as they arrive. One short or late enough to arrive after the shelf empties goes to the buyer instead. ### Setup steps - [ ] Connect Gmail, Google Sheets and OpenAI credentials. - [ ] Create one sheet with six tabs: Products, Sales, Stockouts, Purchase orders, Suppliers, Reorder log. - [ ] Put the sheet ID and your addresses in both Set nodes: the triggers never run together. - [ ] Check the service level, the cover and the approval limit in Set Reorder Policy. ### Customization Every threshold is in a Set node. The demand estimate, the lead times and the order quantities are one Code node.

The steps

  1. Daily Reorder Trigger
  2. Set Reorder Policy
  3. Read Products from Sheets
  4. Aggregate Product Data
  5. Read Stockouts from Sheets
  6. Aggregate Stockout Days
  7. Read Sales from Sheets
  8. Aggregate Sales History
  9. Read Purchase Orders from Sheets
  10. Aggregate Order Pipeline
  11. Read Suppliers from Sheets
  12. Aggregate Supplier Terms
  13. Read Reorder Log from Sheets
  14. Aggregate Reorder History

57 steps in total.

Similar automations