testing 11
This repository uses Telegram Notify GitHub Action to send notifications to Telegram for important releases.
- Create a Telegram bot using @BotFather and get the bot token
- Get your chat ID (you can use @userinfobot)
- Add the bot to your group chat:
- Open the group
- Click the group name at the top
- Click "Add members"
- Search for your bot by username
- Important: After adding the bot, send at least one message in the group, or use the
/startcommand - Consider making the bot an admin in the group (required in some cases)
- Add the following secrets to your repository:
TELEGRAM_TOKEN: Your Telegram bot tokenTELEGRAM_TO: Your chat ID (for group chats, use the format-1001234567890)TELEGRAM_TOPIC_ID: If using a topic in a group, add the topic ID (e.g.,2)
If your group has topics enabled:
-
Topic IDs are simple numbers:
1is usually the General topic (default)2,3, etc. for additional topics you create
-
Finding the correct Topic ID:
- Create a new topic in your group
- Look at the URL when you're in that topic - the last number is often the topic ID
- Or use the "Test Topic Direct API" workflow to try different IDs
-
Direct API for Topics:
- Due to limitations with the action's handling of topics, we use direct API calls
- The "Manual Telegram Direct" workflow uses the Telegram API directly
- This ensures messages go to the correct topic
-
Topic testing:
- Use the "Test Topic Direct API" workflow to send test messages to different topics
- This helps confirm which topic ID corresponds to which channel
If you're using a group chat, make sure to:
- Add your bot to the group
- Send a message in the group (important: mention the bot or use /start)
- Visit
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates - Look for a "chat" section with "id" - for groups, this will start with a minus sign (-)
- If using a topic, note the "message_thread_id" value
Notifications are only sent manually:
- Go to "Actions" tab in the repository
- Select "Manual Telegram Direct" workflow (recommended for topics)
- Click "Run workflow" button
- Enter the release tag (e.g.,
v1.0.0) - Optionally add a custom message
- Select a topic ID (leave empty to use the default from secrets)
- Click "Run workflow" to send the notification
This allows you to control which releases get announced to your Telegram group.
If messages aren't going to the correct topic:
-
Verify Topic ID:
- General topic is usually
1 - Custom topics start from
2and go up sequentially - Use the "Test Topic Direct API" workflow to confirm IDs
- General topic is usually
-
Use Direct API Method:
- The "Manual Telegram Direct" workflow uses direct API calls
- This is more reliable for topic support than the GitHub Action
-
Check Bot Permissions:
- Make sure the bot has admin privileges in the group
- Some groups require this for topic posting
-
Verify Topic Format:
- Topic IDs should be simple numbers (
1,2, etc.) - Don't include any other text or symbols in the ID
- Topic IDs should be simple numbers (
If you keep seeing "Not Found" errors, try these steps in order:
-
Verify Bot Setup:
- Check that your bot token is correct
- Make sure the bot is active (send a direct message to it)
- Try regenerating the token with BotFather if needed
-
Group Chat Permissions:
- Make the bot an admin in the group (this is often required)
- Ensure the group settings allow bot messages
- For privacy-focused groups, you may need to use different settings
-
Chat ID Format Issues:
- For group chats, the ID must start with a minus sign (-)
- For supergroups, the format is usually
-100xxxxxxxxxx - For regular groups, the format is usually
-xxxxxxxxxx - Use the debug-telegram-id.yml workflow to check the exact format
-
Topic ID Issues:
- Topic IDs should be simple numbers (
1,2, etc.) - The General topic is usually
1 - Custom topics start from
2onwards - Try the "Test Topic Direct API" workflow to find the correct IDs
- Ensure you're using the correct
argsformat:-message.thread.id=X(on a single line)
- Topic IDs should be simple numbers (
-
Test with Personal Chat:
- Try sending a message to your personal Telegram ID first
- If that works, the issue is specific to the group configuration
-
Create a Fresh Bot:
- Sometimes creating a new bot resolves permission issues
- Set it up from scratch with BotFather
-
Telegram API Rate Limits:
- Telegram has rate limits that might cause temporary failures
- Wait a few minutes between attempts