{"product_id":"n8n-inventory-stockout-alerts-gemini-sheets-gmail-drafts","title":"n8n Inventory Stockout Alerts: Gemini + Sheets + Gmail Drafts","description":"\u003ch3\u003eKeep your shelves stocked: automatic n8n inventory stockout alerts with Gemini + Sheets + Gmail drafts\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow checks your inventory every morning, calculates days of cover and reorder suggestions from Google Sheets, and then uses Google Gemini to generate a plain-language purchase recommendation. It alerts your team in Slack and creates Gmail drafts (and sends buyer emails) when stockout risk is detected—while writing the updated status back to Google Sheets.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRuns daily at 7:00\u003c\/strong\u003e to start an inventory check.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReads your “Inventory” Google Sheet\u003c\/strong\u003e (SKU, Product, Stock On Hand, Weekly Sales, Lead Time Days, Unit Cost, Supplier, Supplier Email, Last Alert).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalculates key replenishment metrics\u003c\/strong\u003e: daily sales velocity, days of cover, a lead-time-based reorder point, and a suggested order quantity.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSkips recently handled items\u003c\/strong\u003e by ignoring SKUs alerted in the last three days.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses Google Gemini\u003c\/strong\u003e to draft a short, plain-language purchase recommendation for each item that needs attention.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRoutes by status\u003c\/strong\u003e using a Switch step:\n    \u003cul\u003e\n      \u003cli\u003eStockout risks go to \u003cstrong\u003eSlack\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003eSupplier purchase-order emails are \u003cstrong\u003ecreated as Gmail drafts\u003c\/strong\u003e.\u003c\/li\u003e\n      \u003cli\u003e\n\u003cstrong\u003eLow-stock items are emailed to the buyer\u003c\/strong\u003e using the Gemini-generated recommendation text.\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdates Google Sheets\u003c\/strong\u003e by appending or updating cover, reorder point, suggested quantity, and status fields.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eMorning replenishment triage for SaaS operators managing fast-moving SKUs.\u003c\/li\u003e\n  \u003cli\u003eProactive supplier ordering: Slack visibility plus Gmail drafts your team can review before sending.\u003c\/li\u003e\n  \u003cli\u003eReducing stockout risk by combining lead time, sales velocity, and automated recommendations.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\u003c\/strong\u003e: code, google sheets, google Gemini (PaLM) API, gmail, slack, switch, sticky note.\u003c\/li\u003e\n  \u003cli\u003eRequires credentials for \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, \u003cstrong\u003eGoogle Gemini (PaLM) API\u003c\/strong\u003e, \u003cstrong\u003eGmail\u003c\/strong\u003e, and \u003cstrong\u003eSlack\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45822096408755,"sku":"N8N-18067","price":48.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/qQMqacFrNhNouIC0AN_Vd_epl9CkO5.png?v=1786526070","url":"https:\/\/buyflowscripts.com\/products\/n8n-inventory-stockout-alerts-gemini-sheets-gmail-drafts","provider":"N8N Commerce","version":"1.0","type":"link"}