This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
I had run out of face wash and needed to reorder it. But any self-respecting online shopper knows that you never order just one item.
Naturally, this turned into a thorough search of all the skincare products I needed to restock soon. If I could get everything in one order, I'd have fewer parcels arriving throughout the week and could avoid paying delivery fees.
The problem? This happened every time I ran out of something. Face wash, moisturizer, body wash — each time, I'd have to figure out what else was running low before placing an order. Eventually, I got tired of relying on my memory, so I turned to my trusty companion: the Notes app.
Whenever I noticed a product was running low, I'd add it to a note. That way, when it was time to place an order, I'd have a shopping list ready.
Except, of course, I'd forget to update the note. Or I'd forget to check it before ordering. And sometimes, I'd end up going without an essential skincare product for a few days because I'd remembered to reorder it only after running out.
Clearly, my system needed a system of its own.
I wanted something that could keep track of my purchases, figure out what I might need soon, and remind me before I ran out — without requiring me to maintain yet another list.
So I built Morrow, a local-first restock assistant powered by Gemma and Python. It turns my Gmail order history into a weekly restock plan, so I can spend less time remembering what to buy and more time doing literally anything else.
What I Built
Morrow automates the repetitive work of keeping track of everyday purchases. Here's what it does:
Automatic order tracking: Connects to Gmail and processes past order-confirmation emails using Gemma 4 E2B through Ollama, extracting useful purchase information without requiring me to enter every purchase manually.
Purchase history and frequency analysis: Uses Python to consolidate purchases and analyse how frequently I buy each product. This turns scattered order emails into a history that can help estimate when I'll need to restock.
Estimated restock dates: Calculates when products might need replenishing based on past purchase intervals. These are estimates rather than exact expiry or consumption dates, but they provide a useful heads-up before I run out.
Weekly restock summaries: Collects products estimated to need replenishing in the upcoming week and groups them into desktop notifications. Instead of remembering each item individually, I get one consolidated reminder to help plan my next order.
Set-it-and-forget-it scheduling: Runs automatically every Monday at 10:30 AM through Windows Task Scheduler. Once configured, Morrow can check my purchase history and remind me without requiring me to launch the script manually each week.
Local AI processing: Runs Gemma locally on my laptop through Ollama, so email content can be processed without sending it to a hosted LLM provider for extraction. Gmail access still requires an internet connection, but the AI inference happens on my machine.
The goal isn't to automate shopping completely. Morrow doesn't place orders or know exactly how quickly I use each product. It simply gives me a timely reminder based on my purchasing patterns, helping me plan ahead and combine items into fewer orders.
In short, Morrow turns the order emails I already have into a restock list I don't have to maintain myself.
Demo
Morrow runs locally on my Windows laptop. Here's a look at what happens behind the scenes.
- From order emails to structured data
Order-confirmation emails aren't neatly structured datasets. Morrow uses Gemma 4 E2B locally through Ollama to extract product names, sizes, quantities, prices, vendors, and purchase dates into structured JSON.
- From individual purchases to restock estimates
Extracting products is only the first step. Morrow consolidates purchases and analyses historical purchase intervals to estimate when a product might need replenishing. The analysis stage turns individual purchase records into a product-level history and calculates estimated restock dates when sufficient history is available.
- One reminder instead of another list
Rather than checking every product individually, Morrow groups products expected to need replenishing during the selected week and requests a desktop notification.
- Set it up once
Morrow also supports a demo mode, so the workflow can be tested with sample purchase data without accessing Gmail. For everyday use, Windows Task Scheduler can launch the script automatically on a weekly schedule.
Code
The project: View the Morrow repository.
The main workflow is split into small Python scripts:
-
gmail_reader.py— connects to Gmail and retrieves relevant emails. -
debug_gmail_parser.py— sends email content through local Gemma inference and extracts structured purchase information. -
analyze_restocks.py— consolidates purchases, analyses purchase intervals, and estimates restock dates. -
restock_reminder.py— groups upcoming items and requests desktop notifications. -
main.py— orchestrates the workflow, with a demo mode that runs on sample data without accessing Gmail.
I wanted the project to be understandable and runnable, rather than hiding the entire workflow behind one large script.
How I Built It
The central design decision was to use an open-weight model locally instead of sending every email to a hosted AI API.
1. Gemma reads the unstructured information
Order emails aren't a consistent database. Product names, dates, quantities, and other details can appear in different formats depending on the retailer.
Morrow uses Gemma 4 E2B through Ollama to process email content and extract structured information that Python can work with.
This gives the project a practical use for a language model: interpreting messy, real-world text rather than simply generating a response to a prompt.
2. Python turns purchases into a history
Extracting a product name is only the beginning. A useful reminder needs to connect purchases over time.
Morrow consolidates extracted items into a purchase history and analyses the intervals between purchases. Python then estimates future restock dates using that historical information.
This separation is intentional: Gemma handles the language-understanding task, while deterministic Python logic handles the calculations.
These dates are estimates based on past buying patterns, not guarantees about how quickly someone uses a product. A purchase doesn't necessarily mean a product was opened immediately, or that its contents were used at a constant rate.
3. Reminders arrive without another manual check
The reminder component identifies items expected to need restocking and groups them into desktop notifications using Plyer.
I also built a demo mode with sample purchase data. That makes it possible to test the reminder workflow without repeatedly querying Gmail or relying on real purchases being due that week.
The result is a small pipeline that turns emails into something actionable: a reminder at the right time, rather than another list to maintain.
Why Does Open Innovation Matter?
For Morrow, open innovation isn't just about choosing a different model. It changes where the work happens and who controls the workflow.
First, purchase emails are personal data. They can reveal shopping habits, retailers, and details about someone's life. By running Gemma locally, Morrow can process email content on my own machine rather than requiring that content to be sent to a hosted LLM provider for extraction.
Gmail access itself still requires an internet connection, and the project uses Google's Gmail API. Local inference doesn't mean the entire application is offline. It means the AI-processing step can happen locally.
Second, experimentation becomes accessible. I can run the model through Ollama, inspect the extracted results, adjust the Python logic, and debug the pipeline without depending on a paid, per-request model API.
Third, it makes the project easier to build on. The extraction, analysis, and notification stages are separate. Someone can experiment with the extraction prompt, improve the restock algorithm, add another retailer, or change how reminders are delivered without needing to rebuild the entire application.
That is what I value about open innovation: the ability to inspect, adapt, and run the technology in a way that fits the problem.
The Lazy Payoff
The payoff I'm looking for is straightforward: no more discovering that I've run out of face wash, no more scrambling to remember which essentials I meant to reorder, and less dependence on manually maintained shopping lists.
I haven't measured a reliable number of minutes saved, so I won't claim a made-up productivity figure. The real value is in moving from reactive shopping — remembering something only after running out — to being reminded before it becomes urgent.
Morrow uses past purchase patterns to estimate when essentials might need replenishing and brings those items together in a desktop notification. I still decide what to buy and when, but I don't have to keep the entire list in my head.
That is my version of Slow and Steady: set up a useful system once, let it handle the repetitive tracking, and spend less time managing the mundane parts of everyday life.
Prize Categories
- Best Use of Gemma — using Gemma 4 E2B through Ollama for local extraction of structured information from order emails.




Top comments (0)