Setting Up Telegram Bot Credentials
Learn how to create a Telegram bot and connect it to Buzz8n so you can send messages, notifications, and build interactive bots.
Prerequisites: A Telegram account
What You'll Get
After completing this guide, you'll have:
- A Telegram bot with a unique token
- Your Chat ID for sending messages to yourself
- A configured credential in Buzz8n ready to use
Step-by-Step Guide
Open Telegram and Find BotFather
BotFather is Telegram's official bot for creating and managing other bots.
- Open Telegram (mobile app or desktop)
- In the search bar, type
@BotFather - Select the verified BotFather bot (it has a blue checkmark)
- Click "Start" to begin chatting with BotFather
Create Your Bot
Now let's create a new bot:
- Send the command
/newbotto BotFather - BotFather will ask for a name for your bot (e.g., "My Buzz8n Bot")
- Then it will ask for a username. This must:
- End with "bot" (e.g., "mybuzz8n_bot")
- Be unique across all of Telegram
- Only contain letters, numbers, and underscores
- If the username is available, BotFather will create your bot and give you a token
Save Your Bot Token
After creating your bot, BotFather will send you a message containing your bot token. It looks like this:
1234567890:ABCdefGHIjklMNOpqrsTUVwxyz-1234567Your bot token is like a password. Anyone with this token can control your bot!
- Never share it publicly
- Don't commit it to Git repositories
- Store it securely in Buzz8n's credential system
Copy this token - you'll need it in the next steps.
Get Your Chat ID
To send messages to yourself, you need your Chat ID:
- Open Telegram and search for your bot using the username you just created (e.g., @mybuzz8n_bot)
- Click "Start" or send any message to your bot (e.g., "Hello")
- Now, open this URL in your web browser (replace YOUR_BOT_TOKEN with your actual token):
https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdatesYou'll see JSON data that looks like this:
{
"ok": true,
"result": [
{
"update_id": 123456789,
"message": {
"message_id": 1,
"from": {
"id": 987654321,
"is_bot": false,
"first_name": "Your Name"
},
"chat": {
"id": 987654321,
"first_name": "Your Name",
"type": "private"
},
"text": "Hello"
}
}
]
}Look for the "id" field under "chat". In this example, it's 987654321. That's your Chat ID!
Add Credential to Buzz8n
Now let's add your Telegram bot to Buzz8n:
- Log in to your Buzz8n dashboard
- Click "Credentials" in the top navigation
- Click "Add Credential" or the "+" button
- Select "Telegram" from the provider list
- Fill in the form:
- Name: Give it a memorable name (e.g., "My Telegram Bot")
- Bot Token: Paste the token from Step 3
- Click "Save"
Test Your Credential
Let's make sure everything works:
- Create a new workflow or open an existing one
- Add a Telegram "Send a message" node
- Select your newly created credential
- Enter your Chat ID from Step 4
- Type a test message like
"Testing my Telegram bot! 🎉" - Run the workflow
You should receive the message on Telegram!
Advanced Configuration
How do I send messages to a group or channel?
To send messages to a Telegram group or channel:
- Add your bot to the group/channel
- For groups: Make your bot an admin (or allow bots to post)
- Get the group/channel Chat ID:
- Send a message in the group/channel
- Visit the getUpdates URL (same as Step 4)
- Look for
"chat"with"type": "group"or"supergroup" - The Chat ID might be negative (e.g.,
-1001234567890)
Can I customize my bot's profile picture and description?
Yes! Talk to BotFather and use these commands:
/setuserpic- Set a profile picture/setdescription- Set the description users see when they start your bot/setabouttext- Set the "About" text in your bot's profile/setcommands- Set command buttons that appear in the chat
How do I regenerate my bot token if it's compromised?
If your bot token is exposed:
- Open a chat with @BotFather
- Send
/mybots - Select your bot
- Click "API Token"
- Click "Revoke current token"
- BotFather will generate a new token
- Update the token in your Buzz8n credential
Troubleshooting
"Bot token is invalid" error
If you're getting this error:
- Make sure you copied the entire token (no spaces before/after)
- Check that you didn't accidentally modify any characters
- Verify the token hasn't been revoked
- Try generating a new token from BotFather
"Chat not found" error
This usually means:
- You haven't started a chat with your bot yet
- The Chat ID is incorrect
- The Chat ID might need to be negative (for groups)
Solution: Send a message to your bot, then get the Chat ID again using getUpdates.