> ## Documentation Index
> Fetch the complete documentation index at: https://opensre.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Messaging

> Chat with the OpenSRE agent and receive scheduled reports via Slack, Discord, Telegram, Rocket.Chat, WhatsApp, Twilio SMS, Buzz, or email (SMTP).

## Overview

OpenSRE can chat two-way on some platforms and post messages — agent replies and scheduled reports — through messaging and email. Pick the channel where your team already responds to incidents.

## Prerequisites

* Admin or install rights on the platform you choose
* An OpenSRE host that can reach the platform API (and run `opensre gateway start` for two-way chat)

## Setup

| Platform | Best for | Two-way chat? | Configured by | Setup time |
| - | - | - | - | - |
| [**Slack**](https://opensre.com/docs/integrations/messaging/slack.md) | Teams already paged in Slack channels | ✅ Socket Mode chat via `opensre gateway start` (+ webhook delivery) | `opensre integrations setup slack` | \~10 min |
| [**Discord**](https://opensre.com/docs/integrations/messaging/discord.md) | Communities and teams using Discord servers | ✅ Gateway chat via `opensre gateway start` | `opensre integrations setup discord` | \~10 min |
| [**Telegram**](https://opensre.com/docs/integrations/messaging/telegram.md) | Mobile-first and on-call rotations | ✅ DM text chat via `opensre gateway start` | `opensre integrations setup telegram` | \~5 min |
| [**Rocket.Chat**](https://opensre.com/docs/integrations/messaging/rocketchat.md) | Self-hosted and open-source workspaces | ❌ delivery only | `opensre integrations setup rocketchat` | \~5 min |
| [**WhatsApp**](https://opensre.com/docs/integrations/messaging/whatsapp.md) | Mobile alerting via Twilio WhatsApp | ❌ delivery only | `opensre integrations setup whatsapp` | \~5 min |
| [**Twilio SMS**](https://opensre.com/docs/integrations/messaging/twilio-sms.md) | SMS paging via Twilio (separate from WhatsApp) | ❌ delivery only | `opensre integrations setup twilio` | \~5 min |
| [**Buzz**](https://opensre.com/docs/integrations/messaging/buzz.md) | Block Buzz / Nostr workspaces | ✅ channel mentions via `opensre gateway start` | `opensre integrations setup buzz` | \~5 min |
| [**SMTP**](https://opensre.com/docs/integrations/messaging/smtp.md) | Outbound email | ❌ email only | `opensre integrations setup smtp` | \~5 min |

If you're not sure, start with Slack. Pick Discord if you want chat with threaded follow-ups. Pick WhatsApp or Twilio SMS when your team already pages via Twilio.

You can configure more than one. Each is independent and uses its own credentials.

Two-way pairing (`opensre messaging pair|allow|revoke`) applies to **Telegram, Slack, Discord, and Buzz** only.

In the interactive shell, run `/messaging` to choose an action and platform;
`allow` and `revoke` also collect a user ID. Outside the shell, pass `--platform`
and, when needed, `--user-id`.

## Credentials

Each platform guide covers:

1. **Prerequisites** — workspace/server admin rights, Twilio account, etc.
2. **Create the bot/app** — BotFather, Discord Developer Portal, Slack App, etc.
3. **Credentials** — the exact tokens, IDs, and keys to copy.
4. **OpenSRE setup** — `opensre integrations setup …`.
5. **Verify** — how to confirm delivery is working.
6. **Troubleshooting** — common failures.

### Common environment variables

```bash theme={null}
# Slack — webhook delivery and/or Socket Mode gateway
SLACK_WEBHOOK_URL=
SLACK_BOT_TOKEN=
SLACK_APP_TOKEN=
SLACK_ALLOWED_USERS=

# Discord
DISCORD_BOT_TOKEN=
DISCORD_APPLICATION_ID=
DISCORD_PUBLIC_KEY=
DISCORD_DEFAULT_CHANNEL_ID=

# Telegram
TELEGRAM_BOT_TOKEN=
TELEGRAM_DEFAULT_CHAT_ID=
TELEGRAM_ALLOWED_USERS=

# Rocket.Chat (token mode and/or webhook mode)
ROCKETCHAT_SERVER_URL=
ROCKETCHAT_AUTH_TOKEN=
ROCKETCHAT_USER_ID=
ROCKETCHAT_DEFAULT_CHANNEL=
ROCKETCHAT_WEBHOOK_URL=

# WhatsApp (Twilio)
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_WHATSAPP_FROM=
WHATSAPP_DEFAULT_TO=

# Twilio SMS (shares TWILIO_ACCOUNT_SID / TWILIO_AUTH_TOKEN)
TWILIO_SMS_FROM=
TWILIO_SMS_MESSAGING_SERVICE_SID=
TWILIO_SMS_DEFAULT_TO=

# Buzz
BUZZ_RELAY_URL=
BUZZ_PRIVATE_KEY=
BUZZ_DEFAULT_CHANNEL=

# SMTP (email)
SMTP_HOST=
SMTP_PORT=587
SMTP_FROM_ADDRESS=
SMTP_DEFAULT_TO=
```

## Agent tools

Platform-specific send/read tools and gateway behavior are documented on each page (for example `slack_send_message`, `telegram_send_message`, `buzz_send_message`, `twilio_notify`).

## Verify

After editing `.env` or the store, run:

```bash theme={null}
opensre integrations verify <service>
```

Examples: `telegram`, `slack`, `whatsapp`, `twilio`, `buzz`, `smtp`.

Note that `opensre doctor` only inspects the integrations store (`~/.opensre/integrations.json`), so it does **not** detect env-var-only configurations.

### Re-running setup

```bash theme={null}
opensre integrations setup <service>
```

Existing values are often pre-populated so you can press Enter to keep what you have. Slack, Telegram, Discord, Rocket.Chat, Buzz, WhatsApp, Twilio SMS, and SMTP each have a dedicated setup path as listed in the table above.

## Troubleshooting

| Symptom | Fix |
| - | - |
| **Doctor misses env-only config** | Expected — use `opensre integrations verify <service>` |
| **Gateway ignores chat** | Pairing/allow-list applies to Telegram, Slack, Discord, and Buzz — see that platform's page |
| **Not sure which platform** | Start with Slack webhook for delivery; add Socket Mode / Telegram later for two-way chat |

## Security

* Treat webhooks and bot tokens like passwords.
* Prefer dedicated bot accounts and least-privilege scopes.
* Store secrets in the integration store / `~/.opensre/credentials.json` / secret manager — not in source control.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.