# AI Stock Management System
## Overview
This project is an automated stock management system built with **n8n** to simplify inventory operations and reduce manual work. The workflow enables users to manage stock through Telegram while storing and updating inventory records in Google Sheets.
The system processes stock requests, validates existing records, updates inventory quantities, and keeps product information synchronized across multiple workflow branches. Its modular architecture makes it easy to maintain, extend, and integrate with additional business services.
The project demonstrates workflow automation, conditional routing, data processing, and cloud-based inventory management using no-code and low-code technologies.
---
## Features
- Inventory management through Telegram
- Automatic stock updates
- Product lookup using Google Sheets
- Conditional workflow routing
- Inventory quantity modification
- Product information synchronization
- Automated data processing
- Structured workflow architecture
- Modular and scalable design
---
## Workflow Architecture
The project is organized into multiple independent workflows, each responsible for a specific inventory operation.
### Inventory Update
- Receives inventory update requests from Telegram.
- Processes incoming data.
- Searches for the corresponding product.
- Updates inventory records.
- Sends a confirmation message back to the user.
### Stock Management
- Receives stock modification requests.
- Processes the request using custom logic.
- Routes execution using Switch nodes.
- Updates different inventory records depending on the operation.
- Reads and updates Google Sheets dynamically.
### Product Registration
- Receives new product information.
- Retrieves existing inventory data.
- Appends new products.
- Updates inventory records automatically.
- Sends confirmation notifications.
---
## Technologies Used
- n8n
- Google Sheets API
- Telegram Bot API
- JavaScript
- Workflow Automation
---
## Project Structure
- Telegram Trigger
- Code Nodes
- Google Sheets
- Switch Nodes
- Update Row Operations
- Append Row Operations
- Notification Messages
---
## Business Logic
The workflow follows a structured inventory process:
1. Receive a stock request.
2. Process and validate the input.
3. Retrieve product information.
4. Determine the required inventory action.
5. Update stock records.
6. Save the latest inventory data.
7. Notify the user after completion.
---
## Scalability
The workflow is designed to be modular, allowing additional features to be integrated with minimal changes, including:
- Low stock alerts
- Barcode support
- Supplier management
- Purchase order automation
- Inventory analytics
- Dashboard integration
- Email notifications
- AI-powered inventory forecasting
---
## Use Cases
- Restaurants
- Cafés
- Retail stores
- Small businesses
- Warehouses
- Inventory tracking systems
---
## Author
Fares Zahran
AI Automation Developer specializing in workflow automation using n8n, business process optimization, and AI integrations.