A command line tool that monitors your favorite TooGoodToGo stores and notifies you, when they have items available.
- Your GMail data is used to send emails via nodemailer:
GMAIL_USER=
GMAIL_PW=
- Configure your outgoing nodemailer settings (these will also be used to send you notifications about any erros that might occur):
NODEMAILER_SENDER=
NODEMAILER_SENDER_NAME=
- Enter your alertzy key, if you want to receive push notifications instead of emails (this is optional):
ALERTZY_KEY=
- Enter your Pushover app token, if you want to send push notifications via pushover:
PUSHOVER_KEY=
- Finally, enter your TGTG login data and any coordinates as your origin (this is needed for getting any stores, and I didn't feel like generating random coordinates). Additionally, set the most recent user agent, old ones are blocked by the TGTG API:
TGTG_EMAIL=
TGTG_PASSWORD=
TGTG_USER_ORIGIN=
HEADER_UA=
- Create a
recipients.jsoncaccording to the template. This file is read every iteration, so you don't need to restart the service if you change any information.
nameis the name used for sending out emailstriggerdefines when a user should be notified.alwaysnotifies whenever there is a change in available items (eg:3 -> 2 -> 1, but only for>0)availableonly notifies users, once the stock changes from0to>0
notifyBythe channel on which the recipient wants to receive updatesnotifyKeyis the users email adress to receive notification emails, or the users key for the app (alertzy, Pushover)locationsis an array of item ids (which you will need to find out yourself 😉)
- In src/lib/cron.js you can tweak, when the tool should check for available items
- install and compile
npm i && npm run build - run
npm start
{ "name": "firstName lastName", "trigger": "always | available", "notifyBy": "email | alertzy | pushover", "notifyKey": "email | key", "locations": [ "item_id", // comment ] }