Digital Bulldogs

Enter Access PIN

This tool is restricted to authorized users.

Digital Bulldogs · Internal

Telegram Bot Setup

Wire @DigitalBulldogs_bot (or any bot) to a new channel and prove it works before you trust it. This validates the token, auto-fixes the -100 chat-ID gotcha, and sends a real test ping. If it goes green, it's wired correctly — no more silent failures.

1
Add the botAdd the bot to your channel/group as an admin, then post any message there.
2
Get the chat IDOpen api.telegram.org/bot<TOKEN>/getUpdates and copy the "id" number.
3
Validate belowPaste both in, hit test. We fix the format and confirm a live ping lands.
This runs entirely in your browser. Your bot token goes only to Telegram — never to Digital Bulldogs' servers. Nothing is stored, saved, or logged. Close the tab and it's gone.
Uses the Digital Bulldogs bot already saved on the server — you never see or handle the token. Only the chat/topic you enter is sent.
Right-click a channel or topic in Telegram → Copy Link → paste here. We'll fill the chat ID, topic, and type below automatically. (Works with t.me/c/… links.)
From @BotFather → /mybots → your bot → API Token. Never paste this in chat or email.
The raw "id" from getUpdates. Don't worry about the sign or prefix — we normalize it based on the chat type.
Alerts channels are almost always Channel / Supergroup — that's the one that needs the -100 prefix.
Only for forum groups (Topics enabled). The ping posts into this topic. Leave blank for a normal channel or group.
Becomes TELEGRAM_CHAT_ID_ALERTS. Use LEADS, OPS, etc.
What the test ping will say. Leave blank for the default.
The gotchas that broke it last time (read once)

The -100 prefix is the #1 killer. A channel/supergroup ID must start with -100. Without it, Telegram returns chat not found — and because the alert code is fire-and-forget, that error gets swallowed and the bot looks fine while sending nothing.

Chat typeFormatExample
Channel / Supergroupprefix -100-1003913718634
Basic groupnegative, no -100-123456789
Direct messagepositive, no prefix123456789

The other things that bite:

  • The bot must be an admin of a channel (a member is enough for a group). If it was never added, you'll get chat not found or bot is not a member.
  • A bad/revoked token returns 401 Unauthorized on the token check above — regenerate it via @BotFather.
  • In Vercel, env changes don't take effect until you redeploy. Add the vars, then trigger a new deploy.
  • Mark both env vars Sensitive so they're redacted from vercel env pull.

One bot serves many channels — reuse @DigitalBulldogs_bot with a different chat ID per channel. You don't need a new token each time.

Forum groups (Topics): to post into a specific topic, the send needs a message_thread_id — that's the topic ID. Paste the topic's t.me/c/… link at the top and it's filled for you; without it the ping lands in the group's General topic. In code, the alert sender reads TELEGRAM_THREAD_ID.

Deeper reference for developers lives in the repo at docs/telegram-bot-playbook.md.