Today I mapped out an automation system to solve a recurring problem. We needed a shared grocery list app that builds throughout the week, organizes items by aisle, and places a weekly order for pickup.
The stack uses n8n for orchestration, Selenium for browser control, local JSON storage for the list, and Mistral 7B via IRC to format groceries from natural language. It’s fully offline-compatible and runs locally, no cloud dependencies. The eventual goal is a button that orders groceries from Giant every Wednesday without having to think about it.
Here’s how everything connects:
n8n
triggers the workflow every Wednesday at noonSelenium
opens Firefox and searches the grocery siteIRC + Mistral
generates JSON entries from promptsgrocery_list.json
sudo apt install firefox
pip install selenium
pip install huggingface_hub
pip install python-dotenv
[
{ "item": "bananas", "aisle": "Produce", "quantity": 6, "unit": "pieces" },
{ "item": "oat milk", "aisle": "Dairy", "quantity": 2, "unit": "cartons" },
{ "item": "pie crust", "aisle": "Bakery", "quantity": 1 },
{ "item": "mac & cheese", "aisle": "Pantry", "quantity": 3, "unit": "boxes" }
]
This test reads the grocery list and searches each item on Giant’s site:
import time, json
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.options import Options
with open("grocery_list.json") as f:
items = json.load(f)
options = Options()
driver = webdriver.Firefox(options=options)
driver.get("https://giantfoodstores.com")
time.sleep(5)
for entry in items:
search_term = entry["item"]
try:
search_box = driver.find_element(By.NAME, "search")
search_box.clear()
search_box.send_keys(search_term)
search_box.submit()
time.sleep(4)
except Exception as e:
print(f"Error searching {search_term}: {e}")
driver.quit()
grocery_list.json
This system keeps control in our hands. The list is local. The automation is modular. It doesn’t require a third-party app. Just code, chat, and JSON. It’s the beginning of something simple and powerful that fits real life instead of disrupting it.