TooGoodNotify is a customizable notification bot for TooGoodToGo (TGTG) deals, designed to monitor TGTG magic bags and notify users via Telegram. Built with a modular architecture and optimized for efficient event-driven operations, this bot is ready for seamless deployment on AWS Lambda.
- π Automated Monitoring: Tracks TGTG magic bags on a set schedule and sends timely notifications.
- π¬ Telegram Integration: Allows users to interact with the bot through Telegram commands.
- π Multi-language Support: Available in English and French.
- βοΈ AWS Lambda Compatible:: Efficient, serverless deployment.
- Clone the Repository:
git clone https://github.com/jordantete/TooGoodNotify.git
cd TooGoodNotify
- Set Up Conda Environment:
conda env create -f environment.yml
conda activate too_good_notify_env
- Configure Environment Variables in Conda:
To set multiple environment variables at once, use a .env
file. This is faster and keeps your configuration organized.
At the root of the project, create a .env
file and add the necessary environment variables:
# .env
[email protected]
SENDER_EMAIL_PASSWORD=your_email_password
[email protected]
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id
ACCESS_TOKEN=your_tgtg_access_token
REFRESH_TOKEN=your_tgtg_refresh_token
USER_ID=your_tgtg_user_id
TGTG_COOKIE=your_tgtg_cookie
USER_AWS_ACCOUNT_ID=your_aws_user_account_id
LAMBDA_MONITORING_ARN=lambda_arn
- Creating the Lambda Layer:
To create the Lambda layer, use the following commands:
cd lambda_layer
mkdir -p python
pip install \
--platform manylinux2014_x86_64 \
--target=python \
--implementation cp \
--python-version 3.10 \
--only-binary=:all: \
-r requirements_layer.txt
zip -r lambda_layer.zip python/
aws lambda publish-layer-version --layer-name TooGoodNotifyLayer --description "Layer for dependencies" --zip-file fileb://lambda_layer.zip --compatible-runtimes python3.10
Contributions are welcome! If you have ideas, improvements, or bug fixes, feel free to submit an issue or a pull request. Please ensure that your contributions follow the projectβs coding standards and include clear descriptions for any changes.
This project is licensed under the MIT License - see the LICENSE file for more details.
Have any questions or feedback? Feel free to reach out via the issues tab on GitHub. Weβd love to hear from you!