Bots & chats
Bots send your notifications; chats receive them. You can add any number of both and mix them freely in connections.
Bots
Creating a bot
- In Telegram, open a chat with @BotFather.
- Send
/newbotand follow the prompts: pick a display name, then a username ending inbot. - BotFather replies with a token that looks like
123456789:AAExampleTokenString.
Adding the bot to the plugin
In CF7 Telegram → Bots & Chats, click Add bot, give it a label, and paste the token. The token is validated against the Telegram API on save and the bot's profile is fetched — if the token is wrong, you'll know right away.
You can add multiple bots — useful when different sites, brands, or teams should message from different senders.
Keep tokens secret. Anyone with the token can send messages as your bot. If a token leaks, revoke it with BotFather (
/revoke) and save the new one in the plugin.
Chats
A chat is anywhere the bot can deliver a message:
| Type | Notes |
|---|---|
| Private chat | Start a chat with your bot and press Start first — bots can't message you before that. |
| Group / supergroup | Add the bot as a member. |
| Supergroup topic (thread) | Add the bot to the supergroup, then set the optional thread ID on the chat so messages land in that specific topic. |
| Channel | Add the bot as an administrator with permission to post. |
Detecting chat IDs
You don't need to hunt for chat IDs manually:
- Add the bot to the target chat (or message it directly for a private chat) and send any message there.
- In Bots & Chats, click Detect chats and pick the bot.
- The plugin lists every chat the bot has recently seen — pick the right one and it's saved with the correct ID.
If detection doesn't show your chat, send a fresh message in that chat and detect again — Telegram only exposes recent updates.
Entering a chat ID manually
If you already know the ID, you can enter it directly. Group and channel IDs are negative numbers (channels/supergroups usually start with -100), private chat IDs are positive.
Supergroup topics
For forums (supergroups with topics enabled), set the thread ID on the chat. Each topic has its own thread ID — the easiest way to get it is from a topic message link: in https://t.me/c/1234567890/45/123, the middle number (45) is the thread ID.
Testing
Every chat row has a Send test action that delivers a test message immediately — use it to confirm the bot has access before wiring up a connection.