Your personal Telegram assistant, running serverlessly on Cloudflare Workers.
Features β’ Quick Start β’ Configuration β’ Usage
- π Smart Reminders - Cron-based, one-time, or conditional triggers
- β° iOS Automation -
/automationendpoint for iOS Shortcuts alarms - π Prayer Times - Fajr, sunrise, and Jumu'ah reminders
- π Crypto Alerts - BTC Fear & Greed extreme notifications
- π€ AI Integration - MCP server for Claude Desktop
- Node.js 18+
- Cloudflare account (free tier works)
- Telegram account
git clone https://github.com/stackoverprof/teleworker.git
cd teleworker
npm install- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Save the token (looks like
123456789:ABCdefGHI...)
This is needed so your bot knows where to send messages.
- Message @userinfobot on Telegram
- It will reply with your Chat ID (a number like
925512522) - Save this number - you'll use it when creating reminders
npx wrangler d1 create teleworker-dbThis outputs a database ID. Copy it and update wrangler.toml:
[[d1_databases]]
binding = "DB"
database_name = "teleworker-db"
database_id = "YOUR_DATABASE_ID_HERE" # β Paste herenpm run db:migrate# Your Telegram bot token from Step 2
npx wrangler secret put TELEGRAM_BOT_TOKEN
# A password to protect your API (make up any secure password)
npx wrangler secret put ADMIN_PASSWORDnpm run deployYour bot is now live at https://teleworker.YOUR_SUBDOMAIN.workers.dev π
| Value | Where to Set | How to Get It |
|---|---|---|
TELEGRAM_BOT_TOKEN |
wrangler secret put |
From @BotFather |
ADMIN_PASSWORD |
wrangler secret put |
Make up any secure password |
database_id |
wrangler.toml |
From wrangler d1 create output |
chatIds |
When creating reminders | From @userinfobot |
Prayer times are configured for Jakarta. To change, edit src/lib/constants.ts:
export const COORDINATES = {
latitude: -6.2088, // Your latitude
longitude: 106.8456, // Your longitude
};
export const TIMEZONE = "Asia/Jakarta"; // Your timezonecurl -X POST https://your-worker.workers.dev/reminders \
-H "Content-Type: application/json" \
-H "X-Admin-Password: YOUR_PASSWORD" \
-d '{
"name": "Daily Standup",
"message": "π Time for standup meeting!",
"chatIds": "YOUR_CHAT_ID",
"when": "0 2 * * 1-5",
"ring": 0,
"active": 1
}'| Field | Type | Description |
|---|---|---|
name |
string | Display name for the reminder |
message |
string | Message to send (supports {{variables}}) |
chatIds |
string | Your Telegram chat ID from @userinfobot |
when |
string | Cron expression (UTC) or ISO date |
ring |
0 or 1 | 0 = Telegram only, 1 = Include in /automation for iOS alarms |
active |
0 or 1 | 0 = Paused, 1 = Active |
apiUrl |
string? | Optional internal route for conditional triggers |
| Cron | Meaning |
|---|---|
0 2 * * 1-5 |
2:00 AM UTC, Mon-Fri (9:00 AM WIB) |
30 7 * * 5 |
7:30 AM UTC, Friday (2:30 PM WIB) |
0 10 * * * |
10:00 AM UTC, daily (5:00 PM WIB) |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cloudflare Workers β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββ ββββββββββββββββββββββββ β
β β Hono β β Scheduler β β Microservices β β
β β Router β β (Cron) β ββββββββββββββββββββββββ€ β
β β β β β β /fng - Fear&Greed β β
β β /reminders β β * * * * * β β /prayer - Prayer β β
β β /automation β β Checks DB β β /meetings - Monthly β β
β β /mcp β β every min β ββββββββββββββββββββββββ β
β ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β
β ββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β βΌ β
β βββββββββββββββββ β
β β D1 SQLite β β
β βββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββ΄βββββββββββββ
βΌ βΌ
βββββββββββββββ βββββββββββββββ
β Telegram β β iOS β
β Bot API β β Shortcuts β
βββββββββββββββ βββββββββββββββ
MIT Β© stackoverprof
Built with β€οΈ and β on Cloudflare Workers