بنقرة واحدة
messaging-platforms
Configure Hermes messaging gateway for Slack, Telegram, Discord, WhatsApp, Signal, Email, SMS
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Configure Hermes messaging gateway for Slack, Telegram, Discord, WhatsApp, Signal, Email, SMS
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | messaging-platforms |
| description | Configure Hermes messaging gateway for Slack, Telegram, Discord, WhatsApp, Signal, Email, SMS |
| triggers | ["setup slack","configure telegram","connect discord","hermes gateway"] |
Configure Hermes as a bot on various messaging platforms using the built-in gateway. No custom bot code needed.
Hermes has native support for multiple messaging platforms via hermes gateway:
| Platform | Mode | Auth Required |
|---|---|---|
| Slack | Socket Mode | Bot Token + App Token |
| Telegram | Long Polling | Bot Token |
| Discord | Gateway | Bot Token |
| Webhook | Token + Phone ID | |
| Signal | signald | Phone Number |
| IMAP/SMTP | Credentials | |
| SMS (Twilio) | Webhook | Account SID + Token |
# Install Hermes (if not already installed)
uv tool install hermes-agent --python 3.11
# Interactive setup (select platform when prompted)
hermes gateway setup
# Start gateway (foreground)
hermes gateway
# Check all profiles' gateway status
hermes gateway list
# Run gateway for specific profile
HERMES_PROFILE=profilename hermes gateway run --replace
## Automated Setup Scripts
For faster setup without LLM overhead, use the platform-specific scripts:
### Slack
```bash
curl -O https://raw.githubusercontent.com/RiggdAI/gbrain-data/main/skills/messaging-platforms/scripts/setup-slack.sh
chmod +x setup-slack.sh
./setup-slack.sh \
--bot-token xoxb-xxx \
--app-token xapp-xxx \
--allowed-users U01ABC,U02DEF
curl -O https://raw.githubusercontent.com/RiggdAI/gbrain-data/main/skills/messaging-platforms/scripts/setup-telegram.sh
chmod +x setup-telegram.sh
./setup-telegram.sh \
--bot-token 123456:ABC-DEF \
--allowed-users 123456789
curl -O https://raw.githubusercontent.com/RiggdAI/gbrain-data/main/skills/messaging-platforms/scripts/setup-discord.sh
chmod +x setup-discord.sh
./setup-discord.sh \
--bot-token xxx \
--allowed-users 123456789 \
--allowed-guilds 987654321
All scripts:
.env with credentialsKey insight: Gateway is per-profile. Multiple profiles can run gateways simultaneously, each with different bot identities.
DO NOT share Slack tokens across profiles. Each profile needs its own Slack App with unique tokens.
| Wrong | Right |
|---|---|
Profile A uses xapp-1-ABC... | Profile A uses xapp-1-ABC... |
Profile B uses xapp-1-ABC... ❌ | Profile B uses xapp-1-XYZ... ✅ |
Why this fails:
xapp- token"Slack app token already in use (PID XXXX)"Solution: Create a separate Slack App for each profile at https://api.slack.com/apps
hermes slack manifest --write
This generates slack-manifest.json in the current profile directory (e.g., ~/.hermes/ or /opt/data/profiles/{profile}/) with all scopes, events, and slash commands pre-configured.
Required Scopes:
chat:write - Send messagesapp_mentions:read - Detect @mentionschannels:history - Read public channel messagesgroups:history - Read private channel messagesim:history - Read DMsim:read - View DM infofiles:read - Read attachments (images, voice)files:write - Upload filesRequired Events:
message.im - Receive DMsmessage.channels - Receive public channel messagesmessage.groups - Receive private channel messagesapp_mention - Handle @mentionsSocket Mode:
connections:write scopeMessages Tab:
# ~/.hermes/.env
SLACK_BOT_TOKEN=xoxb-xxx
SLACK_APP_TOKEN=xapp-xxx
SLACK_ALLOWED_USERS=U01ABC2DEF3,U02XYZ4GHI5
SLACK_HOME_CHANNEL=C01234567890
/invite @HermesAgent
# Get token from @BotFather
# ~/.hermes/.env
TELEGRAM_BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
TELEGRAM_ALLOWED_USERS=123456789
# Create bot at discord.com/developers/applications
# ~/.hermes/.env
DISCORD_BOT_TOKEN=xxx
DISCORD_ALLOWED_USERS=123456789012345678
DISCORD_ALLOWED_GUILDS=123456789012345678
Per-channel system prompts for different contexts:
# ~/.hermes/config.yaml
slack:
channel_prompts:
"C01RESEARCH": |
You are a research assistant. Focus on academic sources and citations.
"C02ENGINEERING": |
Code review mode. Be precise about edge cases.
Auto-load skills for specific channels:
slack:
channel_skill_bindings:
- id: "C01RESEARCH"
skills:
- arxiv
- writing
- id: "D0ATH9TQ0G6" # DM
skills:
- flashcards
Hermes registers all commands as native Slack slash commands:
| Command | Purpose |
|---|---|
/btw | Continue conversation |
/stop | Cancel current task |
/new | Start fresh session |
/model | Switch model |
/help | Show commands |
In threads: Use ! prefix since Slack blocks / commands in threads:
!queue instead of /queue!model gpt-4o instead of /model gpt-4o| Problem | Solution |
|---|---|
| Bot works in DMs but not channels | Add message.channels event + channels:history scope, reinstall app |
| Bot doesn't see attachments | Add files:read scope, reinstall |
| "Sending messages turned off" in DMs | Enable Messages Tab in App Home |
| Commands not working in threads | Use ! prefix instead of / |
# Comma-separated tokens for multiple workspaces
SLACK_BOT_TOKEN=xoxb-token1,xoxb-token2
Sharing Slack tokens across profiles - Each profile needs its own Slack App with unique tokens. Sharing xapp- tokens causes "token already in use" errors and blocks gateways from starting. Create one Slack App per profile at https://api.slack.com/apps.
Using LLM for setup steps - Setup is deterministic; use the scripts instead of loading this skill and following steps manually. Scripts avoid token overhead and are faster for VPS deployment. - Slack CLI is Slack's official CLI tool for API operations. This is NOT what Hermes uses. Hermes has a built-in Slack gateway that connects via Socket Mode as a bot. Don't install slack-cli — use hermes gateway setup.
Writing custom bot code - Hermes has built-in gateway support. Don't write custom slack-bolt code unless you have a specific need not covered by the native gateway.
Forgot to reinstall after scope change - Slack caches the old config until reinstall.
Missing files:read scope - Bot can chat but can't see images/voice.
Not inviting bot to channel - Bot won't receive any channel messages.
Messages Tab disabled - DMs completely blocked, even with correct scopes.
Old tokens in profile - When creating a new Slack App for a profile, clear old tokens from .env and config.yaml first. Old tokens can cause conflicts or "account_inactive" errors.
Multi-cluster rate limiting - When running multiple Hermes clusters with multiple profiles, all connected to Slack via socket mode, they share the same LLM API key and compete for the same rate limit quota. This causes 429 errors. Solution: Assign separate API keys to different clusters, or reduce the number of active socket connections. Rate limits are per-key, not per-instance.
onboard - Sync profiles from gbrain-dataagent-git-identity - Git commit identityscripts/setup-slack.sh - Automated Slack gateway setup (generates manifest, writes .env, validates tokens)scripts/restart-gateway.sh - Restart one or all Hermes gateways (see below)# Download and use the restart script
curl -O https://raw.githubusercontent.com/RiggdAI/gbrain-data/main/skills/messaging-platforms/scripts/restart-gateway.sh
chmod +x restart-gateway.sh
# Show status
./restart-gateway.sh --status
# Restart specific profile
./restart-gateway.sh chief-technology-officer-2
# Restart all running gateways
./restart-gateway.sh --all
# Stop all gateways
./restart-gateway.sh --stop-all