Skip to main content

Overview

Telegram tool allows you to send messages, photos, and documents via Telegram bots. The user asks to send or read messages; the agent calls Telegram and returns the outcome.

Installation

Environment Variables

Get your bot token from @BotFather.

Quick Start

1

Simple Usage

2

With Configuration

Use the same tool with an agent — see Usage with Agent below, or pass env vars and options from the sections above.
Usage with Agent

Available Methods

send_message(chat_id, text)

Send a text message.

send_photo(chat_id, photo_url, caption=None)

Send a photo.

Common Errors

How It Works


Best Practices

Read the Telegram bot token from the environment, never hard-code it.
Confirm the target chat ID before sending so messages reach the right conversation.
Telegram throttles bursts. Retry with backoff so the agent stays responsive.

Slack

Slack messaging

Discord

Discord messaging

WhatsApp

WhatsApp messaging