AI-Based Medicine Stock Monitoring & Expiry Alert System

Automatically monitor medicine stock, detect low inventory, track expiry dates, and send real-time alerts using n8n workflows.
Main use cases:
- Automatically monitor medicine inventory on a daily basis.
- Detect low stock levels and send instant alerts.
- Track medicine expiry dates and notify for expiring or expired items.
- Update inventory records in Google Sheets in real time.
- Calculate reorder quantities based on sales trends.
- Record medicine sales and adjust stock automatically.
How it Works:
This workflow automates pharmacy inventory management using n8n, Google Sheets, and Twilio. It ensures accurate stock tracking, expiry monitoring, and real-time alerts without manual intervention.
1. Medicine Entry & Inventory Setup
- A form is used to add new medicines with details like:
- Medicine name
- Batch number
- Quantity
- Expiry date
- Minimum stock level
- Supplier and pricing details
- The data is stored in Google Sheets as the central inventory database.
- Default values like status, expiring flag, and reorder quantity are initialized.
2. Daily Inventory Monitoring
- A scheduled trigger runs daily to check all inventory records.
- The system calculates:
- Whether a medicine is expired
- Whether it is expiring within 30 days
- Based on this:
- Expired medicines are flagged as “Do NOT sell”
- Expiring medicines are marked for attention
3. Low Stock Detection
- The workflow compares current quantity with minimum stock level.
- If stock is below the threshold:
- A low stock alert is sent via WhatsApp using Twilio.
4. Expiry & Expired Alerts
- If a medicine is nearing expiry:
- A warning alert is sent with expiry date.
- If already expired:
- A critical alert is sent to prevent selling it.
5. Sales Entry & Real-Time Stock Update
- A sales form captures:
- Medicine name
- Batch number
- Quantity sold
- The system:
- Fetches the matching record
- Deducts sold quantity
- Updates stock instantly in Google Sheets
- If stock becomes low after sale:
- A new alert is triggered automatically
6. Smart Reorder Calculation
- The system calculates reorder quantity using:
- Average daily sales
- Supplier lead time
- This ensures timely restocking and avoids stockouts.
- Reorder values are updated in Google Sheets for planning.
Why This Workflow is Powerful
- Fully automated pharmacy inventory management
- Prevents selling expired medicines
- Real-time stock updates with zero manual tracking
- Instant WhatsApp alerts for critical situations
- Smart reorder planning to avoid shortages
- Scalable for pharmacies, hospitals, and medical stores
Build Smarter AI Automations for Your Business
Want a similar automation for inventory, logistics, or operations?
Explore our AI Agent Development Services and n8n Workflow Automation Services to build powerful, production-ready automation systems.


