# Forecast stockouts and draft purchase orders with Gemini, Sheets, Slack and Gmail

> Quick Overview This workflow runs every morning to read inventory from Google Sheets, calculate days of cover and reorder suggestions, and use Google Gemini to draft a purchase recommendation. It alerts Slack and creates Gmail drafts for stockout risks, emails the buyer for low stock, and writes status fields back to Sheets. How it works 1. Runs daily at 7:00 to start an inventory check. 2. Reads the Inventory sheet from Google Sheets. 3. Calculates daily sales velocity, days of cover, a lead-time-based reorder point, and a suggested order quantity, and skips items alerted in the last three days. 4. Uses Google Gemini to generate a short, plain-language purchase recommendation for each item that needs attention. 5. Routes items by status, sending stockout risks to Slack and drafting a supplier purchase-order email in Gmail. 6. Emails the buyer for low-stock items using the generated recommendation text. 7. Appends or updates the Inventory sheet in Google Sheets with the latest cover, r

- **Domain**: `n8n-workflow-18067.n8n.io`
- **Provider**: n8n.io (https://n8n.io)
- **Kind**: workflow
- **Live-responds (last probe)**: None
- **Signed card**: False
- **Streaming**: False
- **Quality score**: 40%

## URLs
- Agent card: https://n8n.io/workflows/18067
- Page (HTML): https://agenstry.com/agents/n8n-workflow-18067.n8n.io
- Documentation: https://n8n.io/workflows/18067
