Connecting Telegram
Step-by-step guide to set up Telegram bot integration
Connecting Telegram
Want to chat with your AI agent on Telegram? Sweet! It's like having your personal assistant in your pocket. Here's how to set it up.
What You'll Need
Step 1: Create a Telegram Bot
First, you need to create a bot on Telegram. Don't worry, it's easier than making a sandwich.
Talk to BotFather
1. Open Telegram and search for @BotFather
3. Send /newbot to start creating your bot
Set Up Your Bot
BotFather will ask you a few questions:
Bot Name: This is what people see in chats. Something like "My AI Assistant" works great.
**Username**: Must end with "bot" and be unique. Like myawesomeagent_bot
Once you're done, BotFather will give you a Bot Token. It looks like this:
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11Save this token! You'll need it in a minute.
Step 2: Get Your Chat ID
Your agent needs to know where to send messages. That's what the Chat ID is for.
Find Your Chat ID
__CODEBLOCK_1__
3. Look for the "id" field in the response. It's usually a number like 12345678
Alternative Method
If that seems too techy, you can also:
1. Search for @userinfobot on Telegram
2. Start a chat and send /start
Step 3: Connect to PinchKit
Now for the fun part — connecting everything together.
During Setup
If you're creating a new agent, you can add these during the setup process:
- Telegram Bot Token: Paste the token BotFather gave you
- Telegram Chat ID: Enter your Chat ID from Step 2
For Existing Agents
If your agent is already running:
Your agent will restart and connect to Telegram within a minute or two.
Step 4: Test It Out
Time to see if everything works!
If it doesn't respond within a few seconds, check our Troubleshooting guide.
Pro Tips
Custom Commands
You can set up custom commands for your bot to make it feel more official:
1. Go back to @BotFather
2. Send /setcommands
__CODEBLOCK_2__
Privacy Settings
By default, your bot can only see messages sent directly to it. If you want to add it to groups, you'll need to:
1. Go to @BotFather
2. Send /setprivacy
Bot Profile
Make your bot look professional:
1. **Set a description**: /setdescription - Tell people what your bot does
2. **Add a profile picture**: /setuserpic - Upload a nice image
3. **Set about text**: /setabouttext - Short description for the bot profile
What Now?
Your agent can now:
Try asking it to:
Troubleshooting
Bot not responding?
Messages not being delivered?
Still having issues?
Check out our Troubleshooting guide or ask the community.
Nice work! Your agent is now just a Telegram message away 📱✨