Pipe Script Output to Messaging Platforms
Pipe Script Output to Messaging Platforms
Start with meaning, then move to detail.
This lesson explains Pipe Script Output to Messaging Platforms as part of using Hermes through messaging channels. You will learn what it does, when it matters, and the smallest safe test that proves it works.
If you are new, do not memorize names. Focus on three questions: what problem does this solve, what access does it need, and how can you verify the result?
For practice, inspect the first example, identify its effects, run it on test data, and compare the result with the source claim.
For advanced readers, inspect Quick Start, Argument Reference, Target Formats, then verify failure modes and version compatibility.
Prepare the channel account and understand allowlists and secret storage.
A clear outcome before you read.
- Understand Pipe Script Output to Messaging Platforms without assumed prior knowledge.
- Separate the source description from what still needs testing in your environment.
- Read the first command and identify its inputs and outputs before copying it.
Short definitions before the details.
- Gateway
- The process that connects Hermes to channels such as Telegram or Discord and routes messages.
- Session & memory
- A session holds conversation context, while memory keeps selected facts that should persist.
- Automation
- Running work later or repeatedly with explicit success and failure conditions.
Send text from any shell script, cron job, CI hook, or monitoring daemon to Telegram, Discord, Slack, Signal, and other platforms using `hermes send`.
What does the source say, and in what order?
- 01Quick Start
Start here to understand the core idea or structure.
- 02Argument Reference
Read this after the foundation, then connect it to the previous step.
- 03Target Formats
Read this after the foundation, then connect it to the previous step.
- 04Exit Codes
Read this after the foundation, then connect it to the previous step.
- 05Message Body Resolution
Read this after the foundation, then connect it to the previous step.
- 06Real-World Examples
Read this after the foundation, then connect it to the previous step.
- 07Monitoring: Memory / Disk Alerts
Read this after the foundation, then connect it to the previous step.
- 08CI / CD: Build and Test Results
Read this after the foundation, then connect it to the previous step.
- 09Cron: Daily Report
Read this after the foundation, then connect it to the previous step.
- 10Long-Running Tasks: Ping When Done
Finish here to verify the result and special cases.
Copy only after you understand the effect.
# Plain text to the home channel for a platform
hermes send --to telegram "deploy finished"
# Pipe in stdout from anything
echo "RAM 92%" | hermes send --to telegram:-1001234567890
# Send a file
hermes send --to discord:#ops --file /tmp/report.md
# Attach a subject/header line
hermes send --to slack:#eng --subject "[CI] build.log" --file build.log
# Thread target (Telegram topic, Discord thread)
hermes send --to telegram:-1001234567890:17585 "threaded reply"
# List every configured target
hermes send --list
# Filter by platform
hermes send --list telegram#!/usr/bin/env bash
ram_pct=$(free | awk '/^Mem:/ {printf "%d", $3 * 100 / $2}')
if [ "$ram_pct" -ge 85 ]; then
hermes send --to telegram --subject "⚠ MEMORY WARNING" \
"RAM ${ram_pct}% on $(hostname)"
fi# In .github/workflows/deploy.yml or any CI script
if ./scripts/deploy.sh; then
hermes send --to slack:#deploys "✅ ${CI_COMMIT_SHA:0:7} deployed"
else
tail -n 100 deploy.log | hermes send \
--to slack:#deploys --subject "❌ deploy failed"
exit 1
fiRead the first command and identify its inputs and outputs before copying it.
Match every command to your installed Hermes version, review the files and accounts it can reach, and use non-sensitive data for the first test. If this explanation differs from the source, the official source wins.