Install
openclaw skills install @pe4atnik/telegram-wim-wsl-file-deliveryDeliver local reports and artifacts through OpenClaw chat channels. Use when generated HTML/PDF/archive/table files must be sent from local, self-hosted, or WSL OpenClaw setups where host-read policy matters.
openclaw skills install @pe4atnik/telegram-wim-wsl-file-deliveryUse for file delivery from the local filesystem into an OpenClaw message channel.
Prefer this skill when the hard part is not Telegram itself, but the path from local disk -> OpenClaw host-read -> channel send.
HTML is special. Ordinary workspace HTML may be rejected by host-read policy with:
hostReadCapability permits only validated plain-text documents and trusted generated HTML reports for local reads
For local HTML, send a copy from the trusted OpenClaw temp root, normally:
/tmp/openclaw
Do not use plain /tmp, project media/, or arbitrary workspace paths for HTML delivery.
Treat file delivery as an external action.
If the user did not explicitly ask to send the file, confirm:
If the user already asked to send it, continue.
Never send ~, relative paths, or guessed paths.
{
"tool": "exec",
"command": "ls -lh /absolute/path/to/file && file --mime-type /absolute/path/to/file"
}
Check:
Use these defaults:
/tmp/openclaw first, then send that copy.--force-document if compression must be avoided.On local/self-hosted OpenClaw, ordinary local HTML from arbitrary workspace paths is rejected unless it is both:
The current OpenClaw source resolves the POSIX preferred temp root as /tmp/openclaw when safe. The hashed dist module name changes between builds, so do not hard-code stale module names in normal workflow.
Canonical copy + send flow:
{
"tool": "exec",
"command": "set -euo pipefail\nSRC=/absolute/path/report.html\nTMP=/tmp/openclaw\nmkdir -p \"$TMP\"\nchmod 700 \"$TMP\" || true\ncp \"$SRC\" \"$TMP/report.html\"\nchmod 600 \"$TMP/report.html\"\nls -lh \"$TMP/report.html\"\nfile --mime-type \"$TMP/report.html\""
}
Then send the temp copy, not the original HTML:
{
"tool": "exec",
"command": "openclaw message send --channel telegram --target <target> --message \"HTML report\" --media /tmp/openclaw/report.html --force-document --json"
}
Expected success shape includes messageId:
{
"action": "send",
"channel": "telegram",
"handledBy": "plugin",
"messageId": "...",
"payload": { "ok": true }
}
Normally use /tmp/openclaw. If debugging a different platform/build, resolve the preferred root dynamically:
{
"tool": "exec",
"command": "set -euo pipefail\nMOD=$(grep -Rsl 'POSIX_OPENCLAW_TMP_DIR' /usr/lib/node_modules/openclaw/dist/tmp-openclaw-dir-*.js | head -1)\nnode --input-type=module -e \"const m=await import(process.argv[1]); console.log(m.n())\" \"$MOD\""
}
On Windows or unusual tmp permissions, OpenClaw may fall back to a user-scoped temp dir. Use the resolved path instead of /tmp/openclaw in that case.
If a wrapper/tool path injects bad fields or fails ambiguously, stop retrying the same path. Use the documented CLI.
Read the local CLI doc if needed:
{
"tool": "read",
"path": "/usr/lib/node_modules/openclaw/docs/cli/message.md"
}
Typical Telegram sends:
{
"tool": "exec",
"command": "openclaw message send --channel telegram --target <target> --message \"HTML report\" --media /tmp/openclaw/report.html --force-document --json"
}
{
"tool": "exec",
"command": "openclaw message send --channel telegram --target <target> --message \"Report archive\" --media /absolute/path/to/report.tar.gz --force-document --json"
}
For other channels, keep the same shape and adjust --channel and --target according to the CLI docs.
Report the concrete send result or message id.
For report bundles, prefer this order:
.html / .pdf).tar.gz / .zip).csv / .tsv)Poll fields require action "poll"
openclaw message send ... or a truly minimal send path.hostReadCapability permits only validated plain-text documents and trusted generated HTML reports for local reads
/tmp/openclaw and send that copy. Do not use plain /tmp, project media/, or workspace paths.Local media path is not under an allowed directory
/tmp/openclaw/... for HTML or an allowed absolute path for plain documents.Message: ~/path failed
~ to an absolute path; for HTML use /tmp/openclaw.Host-local media sends require buffer-verified media/document types
file --mime-type, or archive the artifact.Telegram compresses media
--force-document.Archive too large
Never loop on the same failing command. Change one variable, retry once.
/tmp/openclaw/... and valid HTML document shape.MEDIA:/... paths may fail even when the file exists.~ and relative paths are risky; use absolute paths..zip or .tar.gz and send as document.references/debug-notes.md - anonymized failure sequence and working commandsreferences/positioning.md - audience and differentiationreferences/comparison-notes.md - what this skill adds beyond generic Telegram sendersexamples/send-html-report.shexamples/send-archive.sh