Node.js cli tool for monitoring BackMarket products. Notifications are shown when the price of any of the products changes. The following notification types are supported:
- Desktop notification
- Console output
- Telegram chat message
- IFTTT integration
- Push message via Gotify
- Install Node.js 8.x or higher (Windows | Linux | OSx).
npm install -g backmarket-watcher
backmarket-watcher config. Add the products you want to watch here. Optionally enable / disable certain notifications. See Configuring Telegram notifiations for instructions on setting up the Telegram notifications.
Configure the watch list
You ca add products to the watch list by search or individually by editing the config file :
"productsSearch": [ "https://www.backmarket.com/search?q=product&ga_search=product" ], "products": [ "https://www.backmarket.com/first-product/123456789.html", "https://www.backmarket.com/second-product/123456789.html" ]
Simply navigate to your local backmarket website and paste desired urls.
Note that search filter are not supported, instead use search queries :
brand "only this string" -NotThatOne
Usage: backmarket-watcher <command> Commands: config Edit the config file. config-reset Reset the config to the default values. config-path Show the path of the config file. watch Start watching for changes. Options: --help Show help [boolean] --version Show version number [boolean]
Displaying the notifications in the Windows notification center
By default Windows doesn't display the notifications in the notification center. You can enable this by doing the following steps.
- Go to 'notifications & actions settings' (
Windows key, type 'notifications',
- Click on the 'toast' app at the bottom of the screen.
- Enable the 'show in action center' checkbox.
Configuring Telegram notifications
- Open a Telegram chat with
- Follow the instructions to create your own bot.
- Copy the token and enter it in the configuration via
backmarket-watcher config, and set
- Start the application
- Click the
t.me/BOTNAMElink from the
- Your bot should greet you, and show a notification about your products. Note: the bot will show the products which you configured. Multiple people can connect to the bot to get updates about these products.
Configure IFTTT integration
- Go to https://ifttt.com/create/.
- Click on
thisand select Webhooks.
- Fill in an Event Name (e.g.
- Click on
- Select anything you'd like to integrate with (e.g. Philips Hue).
- Finish setting it up. Note:
value1contains a plain text message,
value2contains an HTML message.
- Update the
webhookKeyto the token found at Web Hook settings (last part of the URL)
- add the Event Name selected in step 3 to the
Note: You can add multiple events to
Note: the Docker image is a multiarch image. So it will also work on Raspberry Pi's.
- Create a directory to store the config file and copy the config.defaults.json into
YOUR_FOLDER/config.json. See above for instructions on how to configure the application. Make sure that the folder has the correct permissions, e.g. run chmod -R o+rwx config/ or you might get access denied errors on the file system. The app needs read/write access on the configuration file, e.g. to store token received in it.
- Run the following command. Example: a user
johnwho stored the config in
docker run \ --name backmarket-watcher \ -e TZ=Europe/Amsterdam \ -v /home/john/docker/backmarket-watcher:/home/node/.config/backmarket-watcher-nodejs \ youegraillot/backmarket-watcher
Note: When using Gotify as notification, make sure to put them on the same network in docker if hosted on the same docker host, e.g. docker network create gotify and use "--network=gotify" on both containers You can then use "http://gotify" on this container if --name gotify is used for the gotify container
- Create a directory to contain all your Docker Compose things.
- Create a directory
backmarket-watcherinside the created directory, and copy the config.defaults.json to
backmarket-watcher/config.json. See above for instructions on how to configure the application.
- Create a file
version: "3" services: backmarket-watcher: image: youegraillot/backmarket-watcher restart: unless-stopped environment: - TZ=Europe/Amsterdam volumes: - ./backmarket-watcher:/home/node/.config/backmarket-watcher-nodejs
Running with Heroku
- Install the Heroku CLI and login.
- From your terminal, run
heroku config:set BACKMARKET_CONFIG=content, replacing content with the content of your config.json file.
This project is a fork of node-toogoodtogo-watcher