Email-to-Telegram forwarder using Cloudflare Workers
Top 86.1% on sourcepulse
This project provides a Telegram bot that forwards emails to Telegram messages, leveraging Cloudflare Email Routing. It's designed for users who want to receive email notifications directly in Telegram, offering features like email previews, summaries (with OpenAI integration), and management of sender lists via Telegram mini-programs.
How It Works
The solution deploys as a Cloudflare Worker. Emails are routed via Cloudflare Email Routing to the Worker. The Worker then processes the email content and forwards it to a specified Telegram chat using the Telegram Bot API. It utilizes Cloudflare KV for storing configurations like whitelists/blacklists and potentially email data, with an option to integrate OpenAI for content summarization.
Quick Start & Requirements
wrangler deploy
) or copy-paste deployment to Cloudflare Workers.yarn
for CLI deployment.DB
.TELEGRAM_ID
, TELEGRAM_TOKEN
, DOMAIN
, etc.) in Cloudflare Worker settings.Highlighted Details
FORWARD_LIST
.Maintenance & Community
The project is maintained by TBXark. Links to community support (Discord/Slack) or a roadmap are not explicitly provided in the README.
Licensing & Compatibility
Limitations & Caveats
The bot does not support email attachments directly; a separate project is recommended for this. Large emails or attachments might cause Worker timeouts or duplicate notifications, though GUARDIAN_MODE
can mitigate this at the cost of increased KV writes. The WHITE_LIST
and BLOCK_LIST
environment variables are being deprecated in favor of the mini-program management.
5 days ago
1 day