telegram-send-file

Sends one local file to the owner's Telegram chat via the Bot API sendDocument endpoint.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill telegram-send-file-zhiyuan-zhang0206
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: telegram-send-file
Source: https://github.com/zhiyuan-zhang0206/Ava/tree/main/ava_builtins/skills/telegram-send-file
Command: npx skills add https://github.com/zhiyuan-zhang0206/Ava --skill telegram-send-file-zhiyuan-zhang0206

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) components.

What problem does it solve? IM Bridge has no file channel, so agents cannot deliver files, reports, or archives to the user's Telegram chat. This Skill provides the single permitted direct Telegram Bot API call (sendDocument) to deliver one local file to the configured owner chat. ## Core Features & Use Cases - Single-file delivery: Validates and sends one local file (up to Telegram's 50 MB document cap) as a Telegram document with an optional plain-text caption of up to 1024 characters. - Credential safety: Reads the bot token and owner chat ID from the cluster's env aliases (AVA_TELEGRAM_BOT_TOKEN / AVA_TELEGRAM_OWNER_ID), never hardcodes secrets, and sanitizes httpx errors so the token never leaks into output. - Use Case: After generating a weekly PDF report on disk, run the script once to deliver it to the owner's Telegram chat and receive a one-line confirmation with the message_id. ## Quick Start Ask the agent to send the generated report file to your Telegram chat using the telegram-send-file script with an optional caption.

Frequently Asked Questions about telegram-send-file

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send a file to a Telegram chat using the Bot API?

Run the send_file.py script with the Ava venv Python, passing the local file path and an optional --caption argument. It POSTs the file as a multipart document to Telegram's sendDocument endpoint and prints the resulting message_id on success.

What is the Telegram Bot API file size limit for sendDocument?

Telegram caps documents sent through the Bot API at 50 MB. The script validates the file before sending and rejects empty files, directories, missing paths, and anything over the 50 MB limit with a clear error message.

Can I send multiple files or text messages through the Telegram Bot API?

No. The script sends exactly one file per run; sending several files means running it once per file. Text messages are forbidden through the Bot API here — text delivery must go through IM Bridge or ava.ui.notify.

Why does telegram-send-file fail with a credentials error?

The script requires AVA_TELEGRAM_BOT_TOKEN and AVA_TELEGRAM_OWNER_ID in the process environment, normally populated from $AVA_HOME/.env by load_ava_env. If either is missing or the owner ID is zero, it exits with an error naming the missing variable.

Does the Telegram bot token ever appear in error output?

No. httpx exceptions can embed the request URL containing the token, so the script sanitizes every error path and surfaces only the exception class name or the response body, which never contains the token.