Skip to content

feat: add Telegram message action for robot notifications#1347

Merged
openminddev merged 6 commits intoOpenMind:mainfrom
0xbyt4:feature/telegram-integration
Jan 13, 2026
Merged

feat: add Telegram message action for robot notifications#1347
openminddev merged 6 commits intoOpenMind:mainfrom
0xbyt4:feature/telegram-integration

Conversation

@0xbyt4
Copy link
Copy Markdown
Contributor

@0xbyt4 0xbyt4 commented Jan 12, 2026

Summary

  • Add new telegram_message action for sending robot status notifications via Telegram Bot API
  • Implement TelegramAPIConnector using aiohttp for async message delivery
  • Add production config telegram_monitor.json5 for battery and GPS monitoring use case

Files Added

  • src/actions/telegram_message/interface.py - Input/Output dataclasses
  • src/actions/telegram_message/connector/telegramAPI.py - Telegram Bot API connector
  • config/telegram_monitor.json5 - Example config for robot monitoring
  • tests/actions/telegram_message/test_telegramAPI.py - 13 unit tests

Environment Variables Required

  • TELEGRAM_BOT_TOKEN - Bot token from @Botfather
  • TELEGRAM_CHAT_ID - Target chat ID for notifications

Test Plan

  • All 13 unit tests pass
  • Pre-commit hooks pass (black, isort, ruff)
  • Manual testing with MockInput + Ollama verified message delivery

Add Telegram Bot API integration to enable robots to send status
notifications directly to Telegram chats.

Components:
- TelegramMessage interface for message output
- TelegramAPIConnector using aiohttp for async API calls
- Example config for robot monitoring (battery, GPS alerts)
- Comprehensive test suite (13 tests)

Environment variables required:
- TELEGRAM_BOT_TOKEN: Bot token from @Botfather
- TELEGRAM_CHAT_ID: Target chat/group ID

Follows existing action patterns (similar to Tweet action).
@0xbyt4 0xbyt4 requested review from a team as code owners January 12, 2026 17:26
@github-actions github-actions Bot added robotics Robotics code changes python Python code tests Test files config Configuration files labels Jan 12, 2026
openminddev and others added 4 commits January 12, 2026 22:10
- Remove unused 'name' parameter from ActionConfig()
- Add proper type annotation for load_action config dict
- Add None check before using describe_action result
Renamed 'telegram_message' modules and interfaces to 'telegram' for consistency. Replaced environment variable-based configuration with explicit config fields for bot token and chat ID in TelegramAPIConnector. Updated tests and imports to reflect new structure and configuration approach. Removed obsolete config/telegram_monitor.json5.
@openminddev openminddev enabled auto-merge (squash) January 13, 2026 06:30
@openminddev openminddev merged commit d372e01 into OpenMind:main Jan 13, 2026
5 checks passed
aydnOktay pushed a commit to aydnOktay/OM1 that referenced this pull request Jan 19, 2026
)

* feat: add Telegram message action for robot notifications

Add Telegram Bot API integration to enable robots to send status
notifications directly to Telegram chats.

Components:
- TelegramMessage interface for message output
- TelegramAPIConnector using aiohttp for async API calls
- Example config for robot monitoring (battery, GPS alerts)
- Comprehensive test suite (13 tests)

Environment variables required:
- TELEGRAM_BOT_TOKEN: Bot token from @Botfather
- TELEGRAM_CHAT_ID: Target chat/group ID

Follows existing action patterns (similar to Tweet action).

* style: format test file with black

* fix: resolve pyright type errors in telegram tests

- Remove unused 'name' parameter from ActionConfig()
- Add proper type annotation for load_action config dict
- Add None check before using describe_action result

* Refactor Telegram action and connector structure

Renamed 'telegram_message' modules and interfaces to 'telegram' for consistency. Replaced environment variable-based configuration with explicit config fields for bot token and chat ID in TelegramAPIConnector. Updated tests and imports to reflect new structure and configuration approach. Removed obsolete config/telegram_monitor.json5.

---------

Co-authored-by: openminddev <147775420+openminddev@users.noreply.github.com>
Co-authored-by: openmindev <boyuan.eth@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration files python Python code robotics Robotics code changes tests Test files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants