This guide will walk you through setting up Telegram integration for your SupportBuddy chatbot.
Prerequisites #
- A WordPress website with WooCommerce installed
- SupportBuddy plugin installed and activated
- A Telegram account
Step 1: Create a New Telegram Bot #
- Open Telegram and search for “BotFather” (@BotFather)
- Start a chat with BotFather by clicking “Start”
- Create a new bot by sending the command
/newbot
- Enter your bot’s display name when prompted (e.g., “SupportBuddy Demo”)
- Enter a username for your bot following these rules:
- Must end in “bot”
- Use only lowercase letters, numbers, and underscores
- Examples:
supportbuddy_bot
,support_buddy_bot
After successful creation, BotFather will provide you with:
- Your bot’s token (keep this secure)
- A link to your bot
Step 2: Configure Webhook #
- First, log in to your WordPress admin panel
- Navigate to SupportBuddy > Settings
- Go to the “Integrations” tab and select “Telegram”
- Copy the Webhook URL provided in the settings
Now you need to set up the webhook with Telegram. You can do this in two ways:
Option 1: Using BotFather #
- Send
/setwebhook
to BotFather - Enter the webhook URL you copied from SupportBuddy settings
Option 2: Using Direct API Call (Recommended) #
- Open a new browser tab
- Replace the placeholders and paste this URL:
https://api.telegram.org/bot{YOUR_BOT_TOKEN}/setWebhook?url={YOUR_WEBHOOK_URL}
- You should receive a success message
Step 3: Configure SupportBuddy Settings #
- In WordPress admin, go to SupportBuddy > Settings
- Navigate to Integrations > Telegram
- Enable Telegram integration by checking “Enable Telegram Bot”
- Enter your bot token provided by BotFather
- Save the settings
Step 4: Test Your Bot #
- Open Telegram and search for your bot using its username
- Start a chat by clicking “Start”
- Try sending some messages to test:
- Ask about products
- Check order status
- Ask general questions
Troubleshooting #
If your bot isn’t responding:
- Verify Bot Token
- Check if the token is entered correctly in settings
- Try regenerating the token using BotFather if needed
- Check Webhook
- Verify your website is accessible
- Ensure SSL is properly configured (Telegram requires HTTPS)
- Test webhook status using:
https://api.telegram.org/bot{YOUR_BOT_TOKEN}/getWebhookInfo
- Check Server Requirements
- PHP version 7.4 or higher
- SSL certificate installed
- Proper file permissions
Security Considerations #
- Keep your bot token secure
- Don’t share the token publicly
- Regularly check bot activities
- Use a dedicated SSL certificate
- Keep WordPress and all plugins updated
Additional Features #
Your Telegram bot can:
- Answer product queries
- Show product catalogs
- Provide order status updates
- Handle customer support queries
- Send automated notifications
Best Practices #
- Set a clear welcome message
- Use appropriate bot commands
- Monitor bot performance
- Regularly update content
- Keep response times quick
- Test bot regularly
Support #
If you need help:
- Check our FAQ section
- Contact support through our website
- Visit our documentation portal
- Join our community forum
Remember to regularly monitor your bot’s performance and update its knowledge base as needed.