### Echo Telegram Alerts by [@fbsloXBT](https://twitter.com/fbsloXBT) --- ***Disclaimer: It's against Echo rules to share any kind of deal info with people who aren't in the group. Including deal notifications! So run this bot for yourself only, or you might get banned!*** --- This program will read all of your emails, and when it detects a new email from Echo, it will send a telegram message. *Have fun reading it. Hopefully it's bug-free. God bless.* --- You will need some basic Linux/command line skills to do this. Requirements (that I used): - Ubuntu 20.04 - NodeJS (v18.16.0) & NPM (9.5.1) installed --- ### Email server installation I use Protonmail, so I used Protonmail Bridge. But it will probably work with any email server, or you can just create a protonmail account and forward echo emails to it. Install the bridge: https://proton.me/support/installing-bridge-linux-deb-file Install key manager: `apt-get install pass` Generate pgp key: `gpg --full-generate-key` (use default values, passphrase should be empty) Initialize key manager: `pass init ID_FROM_PGP_KEY` (e.g. `pass init 39589EB64392037239057230239B9066A67E`) Run the protonmail bridge (it must be running 24/7, so use something like [screen](https://linuxize.com/post/how-to-use-linux-screen/)): `protonmail-bridge --cli` Inside protonmail bridge command line: Add new account: `login` Wait for the account to sync. Get IMAP credentials: `info` (save it, since you will need this later) (exit from the screen session) --- Create a telegram bot: DM @botfather, and follow the instructions there. You will receive an access token. You can use the bot to send you a DM, but it's easier to just create a channel, add the bot as an admin, and then get a chat ID by opening the channel in telegram web (https://web.telegram.org/), it's in the URL (https://web.telegram.org/a/#-1002146261868, -1002146261868 is the ID you will need later) --- Clone the code: `git clone https://github.com/fbslo/echo-alerts-bot/` `cd echo-alerts-bot` Edit the config at the top of the code. Install dependencies: `npm i imap-simple node-telegram-bot-api` Install PM2 process manager: `npm i -g pm2` Run the bot: `pm2 start index.js --name echo --time` --- ***Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:*** ***The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.*** ***THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.***