Skip to content

Add Telegram notification channel #11

@2214962083

Description

@2214962083

Summary

Telegram is one of the most popular messaging platforms among developers and sysadmins, especially in the international community. Adding Telegram as a notification channel would make CronPulse accessible to a large user base that prefers Telegram for ops alerts.

Problem

Users who use Telegram for team communication have no native way to receive CronPulse alerts in their Telegram chats or groups.

Expected Behavior / Deliverable

  • A new "Telegram" option in the notification channel settings.
  • Users provide a Telegram Bot Token and a Chat ID (individual chat or group).
  • Alerts are sent via the Telegram Bot API (sendMessage) with:
    • Monitor name and status
    • Timestamp
    • Formatted with Markdown or HTML for readability
    • Link back to the CronPulse dashboard
  • Support for both private chats and group chats.

Implementation Hints

  • Notification logic lives in: src/routes/ (API routes) and the notification service layer under src/.
  • Reference the existing Slack/Webhook notification implementations for the pattern.
  • Telegram Bot API endpoint: https://api.telegram.org/bot<token>/sendMessage
  • Payload: { chat_id: "...", text: "...", parse_mode: "HTML" }
  • Docs: https://core.telegram.org/bots/api#sendmessage
  • No external library needed — plain fetch() works perfectly on Cloudflare Workers.

Acceptance Criteria

  • Telegram channel type added to notification settings UI
  • Bot token + Chat ID configuration fields
  • Alert messages sent with proper formatting on state changes
  • "Test notification" button works for Telegram
  • Unit/integration tests for the Telegram notifier

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions