GenAiHub

Last checked 8 October 2026 — responded normally.

Forecast inventory and route purchase orders with Google Sheets, OpenAI, Telegram, Slack, and Gmail

Quick overview

Live
Open / InstallLast updated October 8, 2026

Description

Quick overview This workflow runs daily to forecast SKU demand from Google Sheets data, drafts purchase-order justifications with OpenAI, routes critical and warning items for Telegram review and Slack alerts, logs decisions back to Google Sheets, and sends an HTML digest and supplier emails via Gmail. How it works Runs every day on a schedule and reads Sales History, Inventory, Vendors, and Purchase Orders tabs from Google Sheets. Calculates 7/30-day demand, estimates days of stock remaining, skips SKUs with recent open POs, and classifies each SKU as Critical, Warning, Watch, or OK. For Critical and Warning SKUs, uses OpenAI (gpt-4o-mini) to generate a short purchase-order justification and appends a new row to the Purchase Orders sheet with the draft and recommended quantities. Sends Critical items to Telegram with inline Approve/Reject buttons and posts a critical stockout alert to a Slack channel. Sends Warning items to Telegram as a draft notification, and logs Watch items to Google Sheets without sending messages. Builds an HTML summary of Critical/Warning/Watch items and emails the daily digest to procurement via Gmail. Listens for Telegram approval callbacks, updates the PO status in Google Sheets, and on approval emails the PO details to the supplier via Gmail and confirms the outcome in Telegram. Setup Add Google Sheets OAuth2 credentials and replace YOUR_GOOGLE_SHEET_ID in all Google Sheets nodes, ensuring the spreadsheet has tabs named Sales History, Inventory, Vendors, and Purchase Orders with matching columns (for example SKU, Date, UnitsSold, CurrentStock, SupplierEmail, Status, POId). Add an OpenAI credential (or API key) for the two PO drafting steps and keep the model selection as gpt-4o-mini or update it to your preferred model. Add Gmail OAuth2 credentials and update the digest recipient and supplier-facing email fields (for example procurement@yourcompany.com) to the correct addresses. Add Telegram Bot credentials and replace YOUR_TELEGRAM_CHAT_ID with the chat/group that should receive approval requests and confirmations, then enable the Telegram callback trigger webhook. Add Slack OAuth2 credentials and replace YOUR_SLACK_CHANNEL_ID for critical alerts and workflow error alerts. An n8n automation workflow template by Rahul Joshi.

Community Metrics

Views
2
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Rahul Joshi

Platform

web

Pricing model

paid

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • google-sheets
  • slack
  • telegram
  • gmail
  • code
  • openai

Capabilities

  • 6 nodes
  • 2 views

Information

TypeWorkflow
Sourcen8n
AddedJuly 31, 2026

Comments

?

Others in the same category, ranked by how often they are opened.