A Telegram bot for publishing Amazon affiliate offers with categories, scheduling, anti-duplicate checks and clean offer posts.
Community version of an Amazon affiliate offer publisher for Telegram channels.
Amazon Offers Telegram Bot is a Python-based Telegram bot designed to help manage and publish Amazon affiliate offers.
The bot can collect products, organize them by category, generate clean offer messages, create product images, avoid duplicate ASINs, and publish offers automatically on Telegram.
This repository contains the Community version.
- Telegram offer publishing
- Amazon affiliate links
- Category-based posting
- Automatic scheduler
- Anti-duplicate ASIN checks
- Clean Telegram post formatting
- Offer image generation
- Manual Amazon link posting
- Buffer-based offer queue
- Basic offer quality filtering
- Configurable
.envsettings - Windows-friendly startup scripts
- Selenium-based scraping support
- Amazon PA-API support where configured
🔥 Offerta Amazon
Product title here...
💶 Prezzo: 19,99€
🏷️ Coupon: 10%
📦 Casa e cucina • #Casaecucina • #pubblicità
The goal is to keep posts clean, readable and suitable for Telegram channels.
amazon-offers-telegram-bot/
├─ main.py
├─ requirements.txt
├─ .env.example
├─ README.md
├─ CHANGELOG_V2.md
├─ README_AVVIO_V2.md
├─ avvia_bot.ps1
├─ installa_dipendenze.ps1
└─ src/
├─ assets/
├─ buffer/
├─ configs/
├─ database/
├─ handlers/
├─ promotions/
├─ scraper/
├─ telegram/
├─ tracking/
└─ utils/
Before running the bot, you need:
- Python 3.11 or newer
- A Telegram Bot Token
- An Amazon Partner Tag
- Amazon PA-API credentials, if using PA-API features
- Google Chrome installed, if using Selenium scraping
- Windows PowerShell, if using the included
.ps1scripts
Clone the repository:
git clone https://github.com/castieldev85/amazon-offers-telegram-bot.git
cd amazon-offers-telegram-botCreate a virtual environment:
python -m venv venvUpgrade pip:
.\venv\Scripts\python.exe -m pip install --upgrade pipInstall dependencies:
.\venv\Scripts\python.exe -m pip install -r requirements.txtCreate your environment file:
copy .env.example .env
notepad .envStart the bot:
.\venv\Scripts\python.exe main.pyIf Windows blocks the .ps1 scripts, you can allow script execution only for the current PowerShell session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen you can run:
.\avvia_bot.ps1This change is temporary and applies only to the current PowerShell window.
Copy .env.example to .env:
copy .env.example .envThen edit the .env file:
notepad .envExample configuration:
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
ADMIN_IDS=123456789
AMAZON_PAAPI_ACCESS_KEY=your_amazon_access_key
AMAZON_PAAPI_SECRET_KEY=your_amazon_secret_key
AMAZON_PARTNER_TAG=yourtag-21
BOT_BRAND_TEXT=t.me/your_channelNever publish your real .env file.
Do not commit or publish:
.env- Telegram bot tokens
- Amazon API keys
- real Amazon Partner Tags, if you want to keep them private
- user data files
- logs
- local databases
- buffer files
- generated runtime files
- private configuration files
The repository includes .gitignore rules to help prevent this.
To create a Telegram bot:
- Open Telegram.
- Search for
@BotFather. - Create a new bot with
/newbot. - Copy the bot token.
- Paste the token into your
.envfile:
TELEGRAM_BOT_TOKEN=your_telegram_bot_tokenYou also need your Telegram user ID as admin:
ADMIN_IDS=123456789To publish affiliate links, configure your Amazon Partner Tag:
AMAZON_PARTNER_TAG=yourtag-21If you use Amazon PA-API features, also configure:
AMAZON_PAAPI_ACCESS_KEY=your_amazon_access_key
AMAZON_PAAPI_SECRET_KEY=your_amazon_secret_keyMake sure you follow the rules of the Amazon Associates Program.
The bot supports category-based offer handling.
Example categories may include:
- Abbigliamento
- Elettronica
- Casa e cucina
- Bellezza
- Sport
- Giocattoli
- Fai da te
- Auto e Moto
- Libri e Kindle
- Videogiochi
- Alimentari
- Animali
- Offerte Amazon
- Offerte del giorno
- Offerte lampo
Categories can be extended or customized in the scraper and configuration files.
The bot includes basic offer filtering to reduce low-quality posts.
It can check:
- current price
- old price validity
- discount credibility
- coupon data
- promo code validity
- duplicate ASINs
- previously published products
The Community version includes a basic quality layer.
Advanced scoring and deeper validation may be part of custom or Pro versions.
The bot is designed to avoid repeatedly publishing the same Amazon ASIN too frequently.
Duplicate protection can help prevent:
- repeated offers
- spam-like posting
- low-quality channel experience
- poor user engagement
The bot uses a buffer-based publishing flow.
Typical flow:
Scraper / PA-API
↓
Buffer
↓
Quality check
↓
Anti-duplicate check
↓
Telegram post
This makes it easier to collect offers first and publish them later according to the scheduler.
The scheduler can automatically publish offers based on configured intervals and active settings.
Depending on configuration, the bot can handle:
- automatic posting
- category-based posting
- scheduled time windows
- refill cycles
- offer queue management
The bot can generate clean offer images containing product information such as:
- product image
- current price
- discount badge, when reliable
- brand/channel text
Images should remain simple and readable.
Avoid showing unreliable data such as fake old prices or unrealistic discounts.
Manual start:
.\venv\Scripts\python.exe main.pyUsing the helper script:
.\avvia_bot.ps1To update dependencies:
.\venv\Scripts\python.exe -m pip install --upgrade pip
.\venv\Scripts\python.exe -m pip install -r requirements.txt --upgradeThis repository is intended as a Community version.
It provides a clean starting point for developers who want to build a Telegram bot for Amazon affiliate offers.
It is not intended to expose private tokens, private business logic, paid features, or production secrets.
A more advanced private version may include:
- Advanced offer scoring
- Multi-channel publishing
- Local statistics dashboard
- Category performance reports
- Better scheduling logic
- Smart posting strategies
- Advanced buffer cleanup
- Better invalid-offer quarantine
- More advanced image templates
- Assisted setup and customization
For custom setup, Pro features, or commercial customization, contact the maintainer.
This bot can be useful for:
- Telegram deal channels
- Amazon affiliate publishers
- small community offer groups
- category-specific deal channels
- personal automation experiments
- learning Telegram bot development
This project does not guarantee:
- Amazon sales
- affiliate commissions
- product availability
- price accuracy forever
- compliance with every regional affiliate rule
- protection against Amazon layout changes
Always verify your final configuration and follow Amazon Associates policies.
This project is not affiliated with Amazon.
Amazon and all related marks are trademarks of Amazon.com, Inc. or its affiliates.
Use this project responsibly and follow the Amazon Associates Program policies.
The maintainer is not responsible for misuse, policy violations, account restrictions, incorrect prices, or third-party changes.
This repository includes static project identification strings for attribution and license verification.
Canonical repository:
https://github.com/castieldev85/amazon-offers-telegram-bot
## License
This project is **not open source**.
The source code is publicly visible for review, learning, and evaluation purposes only.
All rights are reserved. You are not allowed to sell, resell, redistribute, repackage, host, publish, or commercially exploit this software or modified versions without explicit written permission from the copyright holder.
See the [LICENSE](LICENSE) file for details.
---
## Contributing
Contributions, suggestions and improvements are welcome.
Before opening a pull request:
- do not include secrets
- do not include `.env`
- do not include logs
- do not include user data
- keep changes clean and documented
---
## Support
For questions, custom setup, or Pro features, contact the maintainer through the preferred contact channel.