Python Bot to notify when you can place order on Instacart -- More details on my blog Raju's Guide
Postman, Python, Twilio and Mailgun
Run this program periodically as a crob job. It will check and notify you via email or text if any local stores listed on Instacart (such as Costco, Safeway, Kroger, Bharat Bazar, CVS) have delivery time windows available so that you can submit orders.
- Provides ability to monitor multiple stores available on Instacart
- You have option to get notification via email or text or both
- Only one notification per delivery window availability
You will need a Mailgun domain to enable notifcation emails.
Twilio account will be needed.
For both of these services (Mailgun & Twilio), I'm replying on basic tier plan which is free and good enough for our minimum needs.
- We will be using Python 3. It's recommended you use Python Virtual Environment along with Pyenv
- Install all needed libraries
pip install -r requirements.txt
- Configuration
- Copy example.env as .env file into your home directory.
- Update each parameter with correct values for your setup. To Find out your Session Cookie info, use Postman App along with Cookies Interceptor for Chrome
- Update stores parameter with store names available in your local area. This may be case sensitivie, not sure.
- example.env is prepopulated store list with costco and cvs store.
INSTACART_STORE_LIST=costco,cvs
- TODO: Future plan is get list of all stores available in your local area using zip code and only provide those as options.
# Get Help to know more about all available options (--store is mandatory. select from available options as mentioned in .env)
python instacart-delivery-time-alert.py --help
# Simple Command line execution
python instacart-delivery-time-alert.py
# Command line execution with email and text notification
python instacart-delivery-time-alert.py --email --text --store costco
# Cron job to run every 5 minutes
*/5 * * * * /usr/local/bin/python /Users/rkadam/work/pyfun/notify-me/instacart-delivery-time-alert.py --email --text --store total-wine-more 2>&1 >> /Users/rkadam/work/pyfun/instacart-run.log.total-wine-more
*/5 * * * * /usr/local/bin/python /Users/rkadam/work/pyfun/notify-me/instacart-delivery-time-alert.py --email --text --store costco 2>&1 >> /Users/rkadam/work/pyfun/instacart-run.log.costco
- You will need to delete lock file for given store (example notification-instacart.lock.costco located in user home directory) if you want to get notification again for your next order.