AI-driven inventory management with OpenAI forecasting & ERP integration
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs on a schedule (every 6 hours). Along the way it connects OpenAI and Postgres.
How it runs
Trigger: On a schedule (every 6 hours).
- Fetch Current Inventory (HTTP Request): calls an HTTP API
- Fetch Sales Velocity (HTTP Request): calls an HTTP API
- Merge Inventory & Sales Data (Code): runs custom JavaScript code
- AI Demand Forecasting (OpenAI): work with custom api call
- Parse AI Response (Code): runs custom JavaScript code
- Filter: keeps only the items that match a condition
- Create Purchase Order (Code): runs custom JavaScript code
- Send PO to Supplier (HTTP Request): calls an HTTP API (POST)
- Log to ERP System (HTTP Request): calls an HTTP API (POST)
- Save to Database (Postgres): run a query
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (7)
- HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi - Filter
n8n-nodes-base.filter - Postgres
n8n-nodes-base.postgres - Send Email
n8n-nodes-base.emailSend - Schedule Trigger
n8n-nodes-base.scheduleTrigger
From the author
This n8n workflow automates the monitoring of warehouse inventory and sales velocity to predict demand, generate purchase orders automatically, send them to suppliers, and record all transactions in ERP and database systems. It uses AI-driven forecasting to…