Step 1: Create a Bot with BotFather
- Open Telegram and search for @BotFather
- Start a conversation and send
/newbot - Follow the prompts to name your bot
- BotFather will give you a bot token like:
Step 2: Configure in Zavu Dashboard
- Go to Senders in your Zavu dashboard
- Select your sender or create a new one
- In the Channels tab, click Add Telegram
- Paste your bot token
- Click Verify to confirm the bot is valid
- Click Save to complete setup
Step 3: Set Up Webhook (Automatic)
When you save your Telegram configuration, Zavu automatically:- Registers your webhook URL with Telegram
- Starts receiving messages from your bot
Bot Commands (Optional)
You can configure bot commands via BotFather:Testing Your Bot
Once configured, test your bot:- Find your bot on Telegram by username
- Send a message to the bot
- Check your Zavu Inbox for the inbound message
- Reply from the Inbox or use the API
Getting Chat IDs
Telegram chat IDs are obtained from inbound messages:- When a user messages your bot, Zavu receives the message
- The
fromfield contains the user’s chat ID - Store this ID to send future messages
Chat IDs are numeric (e.g.,
123456789). They are different from phone numbers and cannot be derived from them.Bot Privacy Mode
By default, bots only receive messages that:- Are sent directly to the bot
- Start with
/(commands) in groups - Mention the bot in groups
Troubleshooting
Bot token invalid
- Regenerate the token via BotFather using
/token - Make sure you copied the complete token
Messages not arriving
- Verify the bot is configured correctly in Zavu
- Check that the webhook is registered (automatic on save)
- Ensure the bot hasn’t been blocked by the user
Can’t message user
- Users must initiate contact first
- Check if the user blocked the bot
- Verify the chat ID is correct
Next Steps
- Telegram Overview - Learn about Telegram capabilities
- Webhooks - Configure webhook events