Back to BlogSetup Guides

Building a Custom Telegram Bot for Daily Briefings

OpenClaw Team
12 min read
March 12, 2024

In this tutorial, we'll build a custom Telegram bot that sends you a personalized morning briefing every day. This is one of the most popular OpenClaw use cases.

What We're Building

Our morning brief bot will deliver:

  • Current weather forecast for your location
  • Top news headlines from your preferred sources
  • Today's calendar events and reminders
  • A daily motivational quote

Setting Up the Telegram Channel

First, we need to create a Telegram bot and connect it to OpenClaw:

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the API token provided by BotFather
  4. In your OpenClaw config, add the Telegram integration:
openclaw config set telegram.token YOUR_BOT_TOKEN
openclaw config set telegram.chat_id YOUR_CHAT_ID

Configuring Data Sources

# Weather API
openclaw skill install weather-api
openclaw config set weather.location "Vilnius, LT"

# News aggregation
openclaw skill install news-reader
openclaw config set news.sources "bbc,reuters,techcrunch"

# Calendar integration
openclaw skill install google-calendar
openclaw auth google-calendar

Setting Up the Cron Schedule

Schedule the bot to send the briefing every morning at 7 AM:

openclaw cron add "morning-brief" --schedule "0 7 * * *" --channel telegram

Testing Your Bot

openclaw run morning-brief --test

This will send a test briefing to your Telegram chat right away.

Customization Ideas

  • Stock market updates for your portfolio
  • Social media mentions and notifications
  • Project status updates from GitHub or Jira
  • Custom AI-generated insights based on your data