connectors
Telegram
Build Task Reminder App with Telegram
What you're building: Task scheduler that sends automatic Telegram reminders
Tech stack: React + NestJS + PostgreSQL + Telegram Bot
Step 1: Tell Cocoding.ai What to Build
Copy/paste this prompt:
Build a simple web application with React frontend and NestJS backendthat allows users to create tasks with a title and reminder time.Integrate a Telegram Bot so users can connect their Telegram accountby clicking "Start" on the bot. Store the user's Telegram chat_id inthe backend.When a task's reminder time is reached, automatically send a remindermessage to the user on Telegram using the Telegram Bot API.Features:- Task creation (title + date & time)- Telegram bot integration- Scheduled reminder delivery- Use Postgres database with TypeORM- Minimal UI focused on functionality
Cocoding.ai creates everything automatically — backend, frontend, database, deployment.
Step 2: Create Telegram Bot
📸 Screenshot placeholder: BotFather conversation in Telegram
2.1 Find BotFather
- Open Telegram
- Search for
@BotFather - Click Start
2.2 Create Your Bot
Send: /newbot
BotFather will ask:
- Bot name (display name):
My Task Reminder - Bot username (must end with
bot):mytask_reminder_bot
📸 Screenshot placeholder: BotFather showing token after bot creation
2.3 Copy Your Token
BotFather replies with:
Use this token to access the HTTP API:1234567890:ABCdefGHIjklMNOpqrsTUVwxyz1234567890
Copy this token — you'll need it next.
Step 3: Add Bot Token to App
📸 Screenshot placeholder: .env file open in editor showing TELEGRAM_BOT_TOKEN
Open backend/.env and add your token:
TELEGRAM_BOT_TOKEN=1234567890:ABCdefGHIjklMNOpqrsTUVwxyz1234567890
Save the file — app restarts automatically.
Step 4: Connect Your Telegram
📸 Screenshot placeholder: App showing "Connect Telegram" button
4.1 Open Your App
- Open the app URL (Cocoding.ai provides this)
- Click "Connect Telegram"
📸 Screenshot placeholder: Telegram bot opened with "Start" button
4.2 Start the Bot
- Telegram opens your bot
- Click "Start"
- You should receive:
🎉 Connected! You will now receive task reminders here.
Step 5: Create Tasks & Test
📸 Screenshot placeholder: Task creation form
- Enter Task Title
- Select Date & Time (2 minutes from now for testing)
- Click "Create Task"
📸 Screenshot placeholder: Task list showing created tasks
📸 Screenshot placeholder: Telegram message received with reminder
Wait for the reminder time — you'll get a Telegram message!
Troubleshooting
Bot not working?
- Check
.envhas correct token (no extra spaces) - App restarted after saving
.env - Check logs for:
Telegram bot started
Not getting reminders?
- Verify app shows "Connected" status
- Make sure you clicked "Start" in Telegram bot
- Reminder time must be in the future
- Each reminder only sends once
Connection failed?
- Open bot in Telegram
- Click "Start" again
- Check if you received the connected message
Customize Your Bot (Optional)
Set Description
In Telegram to @BotFather:
/setdescription
Select your bot, send: Get task reminders directly in Telegram
Add Profile Picture
/setuserpic
Select your bot, upload image (512x512 recommended)
Set Commands
/setcommands
Select your bot, send:
start - Connect your accounthelp - Show help
Security Tips
✅ Never share your bot token publicly
✅ Don't commit `.env` to git
✅ Regenerate token if exposed:
/mybotsin @BotFather- Select your bot
- API Token → Revoke current token
- Update
.envwith new token
Going to Production
Get Your Bot Verified
For large-scale usage:
- Your bot works immediately for testing
- For production, consider bot verification through Telegram
- Monitor rate limits (30 messages/second per bot)
Scale Considerations
- Multiple users: Single bot handles all users
- High volume: Use webhook instead of polling
- Security: Add user authentication to your app
Customize Your App
Tell Cocoding.ai what you want:
- "Send reminders 15 minutes before instead of at task time"
- "Add task categories/tags"
- "Let users complete tasks by replying to Telegram messages"
- "Add recurring tasks"
- "Send daily summary of all tasks"