Back to Projectsautomation

Task Scheduler Bot

A Telegram bot that helps users schedule tasks, set reminders, and track habits with natural language processing.

November 15, 2023
2 min read
Aaron M Sabu
PythonTelegram APINLPMongoDBAWS Lambda

Overview

Task Scheduler Bot is a Telegram bot that lets users manage tasks and reminders using natural language commands.

Why Telegram?

  • Always accessible: People already have Telegram on their phones
  • No new app to install: Lower barrier to adoption
  • Rich interaction: Buttons, inline keyboards, notifications
  • Cross-platform: Works on mobile, desktop, and web

Natural Language Understanding

Users can type commands naturally:

"Remind me to call John tomorrow at 3pm"
"Add buying groceries to my list"
"What tasks do I have this week?"
"Mark the report as done"

The bot parses these into structured actions using NLP:

# Example parsing
input: "Remind me to call John tomorrow at 3pm"
output: {
  "action": "create_reminder",
  "task": "call John",
  "datetime": "2024-01-16T15:00:00",
  "recurring": false
}

Features

Task Management

  • Create, update, delete tasks
  • Set due dates and priorities
  • Categorize with tags
  • Search and filter

Reminders

  • One-time reminders
  • Recurring reminders (daily, weekly, monthly)
  • Location-based reminders (coming soon)

Habit Tracking

  • Define habits to track
  • Daily check-ins
  • Streak counting
  • Weekly reports

Technical Implementation

Serverless Architecture

The bot runs on AWS Lambda for:

  • Cost efficiency: Pay only for actual usage
  • Scalability: Handles traffic spikes automatically
  • Low maintenance: No server management

Database Design

MongoDB stores user data with this structure:

{
  userId: "telegram_123456",
  tasks: [...],
  reminders: [...],
  habits: [...],
  preferences: {
    timezone: "Asia/Kolkata",
    reminderTime: "09:00"
  }
}

Usage Statistics

After 3 months of operation:

  • 500+ active users
  • 10,000+ tasks created
  • 95% reminder delivery rate

Lessons Learned

  • Natural language parsing doesnt need to be perfect - handle edge cases gracefully
  • User onboarding is crucial - provide examples of valid commands
  • Timezone handling is tricky but essential for reminders