A telegram bot for saving messages to self-hosted memos, and hosted on cloudflare worker.
Support message types:
- Text
- Photo
- File
- Image or video sticker
Telegram limit: bot can download files of up to 20MB in size.
- Clone repo;
- Run
npm install && npm run deploy
to deploy; - Create your bot via https://t.me/BotFather;
- Find your telegram id via https://t.me/userinfobot;
- Go to the cloudflare worker dashboard, add encrypted variables:
TG_BOT_TOKEN
: your bot token;TG_BOT_WEBHOOK_PATH
: optional path, can use as secret;MEMOS_OPENAPI_$(your telegram id)
: your memos openapi url;
- use https://telegram-set-webhook.tools.dor.ky to bind your worker and bot;
Finally, you can send text or photo to memos.