{"product_id":"n8n-inventory-forecasting-po-routing-with-google-sheets-openai","title":"n8n Inventory Forecasting \u0026 PO Routing with Google Sheets + OpenAI","description":"\u003ch3\u003eAutomated inventory forecasting and PO routing in n8n—powered by Google Sheets + OpenAI\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow forecasts SKU demand from your Google Sheets, drafts purchase-order justifications with OpenAI, and routes Critical and Warning items for Telegram review—while sending Slack alerts and a daily procurement email digest.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cp\u003eRun daily on a schedule, the workflow reads these tabs from your Google Sheets:\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eSales History\u003c\/b\u003e, \u003cb\u003eInventory\u003c\/b\u003e, \u003cb\u003eVendors\u003c\/b\u003e, and \u003cb\u003ePurchase Orders\u003c\/b\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eIt then:\u003c\/p\u003e\n\u003cul\u003e\n  \u003cli\u003eCalculates \u003cb\u003e7\/30-day demand\u003c\/b\u003e and estimates \u003cb\u003edays of stock remaining\u003c\/b\u003e for each SKU.\u003c\/li\u003e\n  \u003cli\u003eSkips SKUs that have \u003cb\u003erecent open POs\u003c\/b\u003e to avoid duplicate purchasing.\u003c\/li\u003e\n  \u003cli\u003eClassifies each SKU as \u003cb\u003eCritical, Warning, Watch, or OK\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eFor \u003cb\u003eCritical and Warning\u003c\/b\u003e SKUs, calls \u003cb\u003eOpenAI (gpt-4o-mini)\u003c\/b\u003e to generate a \u003cb\u003eshort PO justification\u003c\/b\u003e, then appends a new row to the \u003cb\u003ePurchase Orders\u003c\/b\u003e sheet with draft details and recommended quantities.\u003c\/li\u003e\n  \u003cli\u003eSends \u003cb\u003eCritical\u003c\/b\u003e items to \u003cb\u003eTelegram\u003c\/b\u003e with inline \u003cb\u003eApprove\/Reject\u003c\/b\u003e buttons and posts a \u003cb\u003ecritical stockout alert\u003c\/b\u003e to \u003cb\u003eSlack\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eSends \u003cb\u003eWarning\u003c\/b\u003e items to \u003cb\u003eTelegram\u003c\/b\u003e as a draft notification.\u003c\/li\u003e\n  \u003cli\u003eLogs \u003cb\u003eWatch\u003c\/b\u003e items back to Google Sheets without sending messages.\u003c\/li\u003e\n  \u003cli\u003eBuilds an \u003cb\u003eHTML summary\u003c\/b\u003e (Critical\/Warning\/Watch) and emails the daily digest to procurement via \u003cb\u003eGmail\u003c\/b\u003e.\u003c\/li\u003e\n  \u003cli\u003eAfter Telegram approval callbacks, updates \u003cb\u003ePO status\u003c\/b\u003e in Google Sheets; on approval emails, sends PO details to the supplier via \u003cb\u003eGmail\u003c\/b\u003e and confirms the outcome in Telegram.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003ePrevent stockouts by automatically routing at-risk SKUs to decision-makers.\u003c\/li\u003e\n  \u003cli\u003eSpeed up procurement by drafting PO justifications using OpenAI and logging everything in Google Sheets.\u003c\/li\u003e\n  \u003cli\u003eProvide a daily operational digest to suppliers and internal teams via Gmail and Slack.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cb\u003eIntegrations:\u003c\/b\u003e Google Sheets (OAuth2), OpenAI (gpt-4o-mini), Telegram, Slack, Gmail.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eWorkflow nodes used:\u003c\/b\u003e if, code, gmail, merge, slack, switch.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cb\u003eSetup requirement:\u003c\/b\u003e add Google Sheets OAuth2 credentials and replace \u003cb\u003eYOUR_GOOGLE_SHEET_ID\u003c\/b\u003e (including the spreadsheet tab references used by the workflow).\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45748946632883,"sku":"N8N-17683","price":22.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/GUkwS90Rpa7rZ1YNgYNiP_kdQ07EK7.png?v=1785575595","url":"https:\/\/buyflowscripts.com\/products\/n8n-inventory-forecasting-po-routing-with-google-sheets-openai","provider":"N8N Commerce","version":"1.0","type":"link"}