360 Secure SkillHub
360 安全技能中心

Telegram File Sender

在 openclaw 环境中将本地文件(zip、pdf、图片等)发送到当前 Telegram 会话:先确认文件路径存在,再从系统提示的 Inbound Context 读取 chat_id,调用 send_file.sh 完成发送,可附自定义说明文字,发送后记录消息 ID;chat_id 不硬编码。

dzunglaviet
dzunglaviet
热度 27.91
最近更新 2026-05-14 11:30:34
分类:协作依赖:代码执行 / 读写文件应用场景:工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add better-telegram-file-sender
Metadata
name
telegram-file-sender
description
Send files (zip, pdf, image, etc.) to the current Telegram chat using openclaw message send --media. Use when user asks to "gửi file", "send zip/file", "attach pdf", or "ship file to me". Handles path resolution, caption, validation. ALWAYS use this skill for ALL sessions when instructed to send files via Telegram.

Telegram File Sender

Workflow

  1. Confirm file exists (read path).
  2. Read chat_id from the ## Inbound Context (trusted metadata) JSON block in the system prompt (value looks like telegram:1234567890).
  3. Run scripts/send_file.sh <path> ['caption'] <chat_id>.
  4. Confirm sent (msg ID logged).

Examples

  • User: "Gửi zip cho tao" → exec send_file.sh ./file.zip "Your file 🦾" telegram:1234567890
  • User: "Attach test.pdf" → send_file.sh test.pdf "File from OpenClaw 🦾" telegram:1234567890

File not found? Ask user confirm path.

Caption optional, default "File from OpenClaw 🦾".

Resolve paths: workspace rel, abs ok.

chat_id: always taken from ## Inbound Context → chat_id field. Never hardcode.