AgentStack
SKILL verified MIT Self-run

Openclaw Add Channel

skill-rahulsub-be-cc-openclaw-openclaw-add-channel · by rahulsub-be

Add a messaging channel binding (Telegram, Slack, WhatsApp, or GChat) to an existing OpenClaw agent

No reviews yet
0 installs
15 views
0.0% view→install

Install

$ agentstack add skill-rahulsub-be-cc-openclaw-openclaw-add-channel

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Openclaw Add Channel? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Add Channel to Agent

Add $1 channel to agent $0.

Reference

Read ~/.openclaw/workspace/skills/07-channel-configuration.md for detailed guidance.

Setup Detection

OPENCLAW_REPO=$(readlink ~/.openclaw/openclaw.json 2>/dev/null | sed 's|/.openclaw/openclaw.json||')
TIER_CONFIGS=(~/.openclaw/configs/openclaw-*.json)
[[ -f "${TIER_CONFIGS[0]}" ]] && MULTI_GATEWAY=true || MULTI_GATEWAY=false

Resolve Config File

Multi-gateway

Find which tier the agent belongs to:

for cfg in ~/.openclaw/configs/openclaw-*.json; do
  if grep -q "\"id\": *\"$0\"" "$cfg" 2>/dev/null; then
    TIER=$(basename "$cfg" | sed 's/openclaw-//;s/.json//')
    CONFIG="$OPENCLAW_REPO/.openclaw/configs/openclaw-$TIER.json"
    break
  fi
done

If the agent isn't found in any tier config, ask the user which tier it belongs to.

Single-gateway

CONFIG="$OPENCLAW_REPO/.openclaw/openclaw.json"

Steps

  1. Read current config: Read $CONFIG to see existing channels and bindings.
  1. Depending on channel type:

Telegram

  • Ask user for the bot token (from @BotFather)
  • Store in keychain:
  • Multi-gateway: security add-generic-password -s "openclaw-$TIER-telegram-$0-bot-token" -a "openclaw" -w "" ~/.openclaw/openclaw.keychain-db
  • Single-gateway: security add-generic-password -s "openclaw.telegram-$0-bot-token" -a "openclaw" -w "" ~/.openclaw/openclaw.keychain-db
  • Add to channels.telegram.accounts in the config (NEVER add botToken at the top-level telegram config — only in accounts):

``json "$0": { "name": "", "enabled": true, "dmPolicy": "pairing", "botToken": "${OPENCLAW_TELEGRAM__BOT_TOKEN}", "groupPolicy": "allowlist", "streaming": "partial" } ``

  • Add binding: {"agentId": "$0", "match": {"channel": "telegram", "accountId": "$0"}}

Slack

  • Ask user for bot token (xoxb-...) and app token (xapp-...)
  • Store both in keychain (same tier-aware naming as Telegram)
  • Add to channels.slack.accounts with both tokens, nativeStreaming: true (NEVER add tokens or nativeStreaming at the top-level slack config — only in accounts)
  • Add binding with accountId

WhatsApp

  • Add phone numbers to channels.whatsapp.allowFrom array
  • Create binding: {"agentId": "$0", "match": {"channel": "whatsapp"}}

GChat

  • Add binding: {"agentId": "$0", "match": {"channel": "gchat", "accountId": "$0"}}
  1. Update secrets loader script:

Multi-gateway

Add export lines to $OPENCLAW_REPO/.openclaw/scripts/start-$TIER.sh (before the exec block), following the existing kc() pattern in the file.

Single-gateway

Add export lines to BOTH:

  • $OPENCLAW_REPO/.openclaw/scripts/openclaw-secrets.sh
  • $OPENCLAW_REPO/.openclaw/scripts/openclaw-env.sh
  1. Update secrets.sh — Add entry to the SECRETS array in $OPENCLAW_REPO/secrets.sh
  1. Stow and restart:
rm -f ~/.openclaw/cron/jobs.json
cd "$OPENCLAW_REPO" && stow --no-folding -t ~ .

Multi-gateway

launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway.$TIER

Single-gateway

launchctl kickstart -k gui/$(id -u)/ai.openclaw.gateway
  1. Verify: Check the tier's gateway logs for the new channel starting, then send a test message.
  • Multi-gateway: tail -30 ~/.openclaw-$TIER/gateway.log
  • Single-gateway: tail -30 ~/.openclaw/logs/gateway.log

Important

  • Env var naming convention: OPENCLAW_TELEGRAM__BOT_TOKEN (uppercase, underscores)
  • Channel tokens go ONLY in the accounts section — never at the top-level channel config. Adding tokens at both levels causes duplicate responses.
  • Never echo the token back to the user after storing it

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.