π¦ ClawHub
Axi Send File
by @awalesagar
Convert workspace files into Telegram-downloadable attachments (PDF/ZIP). Use when the user asks to receive, download, or be sent a file that was generated o...
TERMINAL
clawhub install axi-send-fileπ About This Skill
name: send-file description: | Convert workspace files into Telegram-downloadable attachments (PDF/ZIP). Use when the user asks to receive, download, or be sent a file that was generated or exists in the workspace. Handles the OpenClaw MEDIA: delivery mechanism for Telegram channel. allowed-tools: - Bash(mdpdf *) - Bash(zip *) - Bash(cp *) - Bash(ls *) - Bash(mkdir *)
send-file
Convert local files into Telegram-friendly downloadable attachments.
When to use
MEDIA: delivery of .md or raw text failed (user couldn't download)The Problem
OpenClaw's MEDIA: directive delivers files through Telegram's Bot API. However:
.md files β Telegram shows inline as plain text, NOT as a downloadable document.zip files β Sometimes work, sometimes blocked.pdf files β β
Always delivered as a downloadable document.png/.jpg files β β
Always delivered as an imageSolution
Step 1: Convert to PDF
# Install if not already present
pip install --user --break-system-packages mdpdf 2>/dev/nullConvert markdown β PDF
~/.local/bin/mdpdf -o /tmp/output.pdf /path/to/input.md
Step 2: Deliver via MEDIA
In your reply, add:
MEDIA:/tmp/output.pdf
For multiple files β ZIP them
cd /tmp && zip bundle.pdf.zip file1.pdf file2.pdf
Then:
MEDIA:/tmp/bundle.pdf.zip
Important: Name ZIP files with .pdf.zip suffix β Telegram handles these more reliably.
Delivery Patterns
Single markdown file
~/.local/bin/mdpdf -o /tmp/report.pdf /home/axiom/.openclaw/workspace/report.md
Reply:
MEDIA:/tmp/report.pdf
Multiple markdown files
~/.local/bin/mdpdf -o /tmp/report1.md file1.md
~/.local/bin/mdpdf -o /tmp/report2.md file2.md
cd /tmp && zip reports.pdf.zip report1.pdf report2.pdf
Reply:
MEDIA:/tmp/reports.pdf.zip
Already a binary file (PDF, image, etc.)
Just send directly β no conversion needed:MEDIA:/path/to/file.pdf
Non-markdown text files (CSV, JSON, etc.)
# Wrap in a zip for reliable download
cd /tmp && zip data.zip data.csv
Reply:
MEDIA:/tmp/data.zip
OpenClaw MEDIA: Reference
The MEDIA:/path line in assistant output triggers OpenClaw's file delivery:
/tmp, ~/.openclaw/media/sendDocument)MEDIA: lines = multiple attachmentsTool Dependencies
pip install mdpdf)