Telegram Notifier¶
What It Does¶
Automatically send Telegram notifications to customers and admins when orders are placed. Get instant alerts in your Telegram app without needing any third-party service.
When to Use It¶
Enable this plugin if you want to:
- Send automatic order confirmations to customers via Telegram
- Get instant Telegram alerts when new orders arrive
- Provide customers another communication channel
- Use a free notification service (no SMS costs)
- Keep all order notifications in one Telegram chat
How It Works¶
You create a Telegram bot using BotFather, then configure it in your store. When orders are placed, your bot sends formatted messages to customers and/or admins automatically.
Setup Instructions¶
Step 1: Create a Telegram Bot¶
- Open Telegram and search for @BotFather
- Start a chat with BotFather
- Send the command:
/newbot - BotFather will ask for a name for your bot
- Enter a display name (e.g., "MyStore Order Bot")
- BotFather will ask for a username for your bot
- Must end in
bot(e.g., "mystore_order_bot") - Must be unique across Telegram
- BotFather will create your bot and give you an API token
- It looks like:
123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ - Copy and save this token - you'll need it in Step 3
Example conversation:
You: /newbot
BotFather: Alright, a new bot. How are we going to call it?
You: MyStore Order Bot
BotFather: Good. Now let's choose a username for your bot.
You: mystore_order_bot
BotFather: Done! Here's your token: 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
Step 2: Get Your Admin Chat ID¶
To receive admin notifications, you need your Chat ID:
Method 1: Using @userinfobot (Easiest)
- Open Telegram and search for @userinfobot
- Start a chat with the bot
- Send any message (like "hello")
- The bot will reply with your user info
- Copy the Id number (e.g.,
123456789)
Method 2: Using @chatIDrobot
- Open Telegram and search for @chatIDrobot
- Start a chat with the bot
- The bot will automatically send your Chat ID
- Copy the number
Method 3: Manual method
- Send a message to your bot (the one you created in Step 1)
- Visit this URL in your browser (replace
YOUR_BOT_TOKEN):https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates - Look for
"chat":{"id":123456789} - Copy the
idnumber
Save your Chat ID - you'll need it in Step 3.
Step 3: Enable the Plugin¶
- In your store admin, go to System Settings > Plugins
- Find the Telegram Notifier card
- Click Configure
- Enable the plugin using the toggle switch
- Fill in the configuration fields:
- Bot Token: Paste the token from Step 1
- Admin Chat ID: Paste the Chat ID from Step 2
- Configure notification settings and templates (see below)
- Click Save
Step 4: Set Up Customer Notifications (Optional)¶
For customers to receive notifications, they need to:
- Find your bot in Telegram (use the username you created, e.g., @mystore_order_bot)
- Start a chat with the bot (click "Start")
- Add their Telegram Chat ID to their account in your store:
- Customer goes to their account settings
- Enters their Telegram Chat ID
- Saves their profile
Note: Customers can get their Chat ID using @userinfobot (see Step 2).
Step 5: Test the Plugin¶
- Click the Test button on the plugin card
- The system will send a test message
- Check your Telegram - you should receive a message from your bot
If the test works, you're all set!
Configuration Fields¶
Basic Settings¶
Enabled¶
Type: Toggle Description: Turn the plugin on or off
Bot Token¶
Type: Text
Required: Yes
Format: 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
Description: Your Telegram Bot API token from @BotFather
Where to get it: Create a bot with @BotFather (see Step 1)
Admin Chat ID¶
Type: Text
Required: Yes
Format: Numbers only (e.g., 123456789)
Description: Your Telegram user ID for receiving admin notifications
Where to get it: Use @userinfobot or @chatIDrobot (see Step 2)
Notification Settings¶
Notify Customers¶
Type: Checkbox Default: Enabled (checked) Description: Send Telegram confirmation to customers when they place orders
Requirements: - Customers must have their Telegram Chat ID saved in their account - Customers must have started a chat with your bot
When to disable: If you only want admin notifications
Notify Admin¶
Type: Checkbox Default: Enabled (checked) Description: Send Telegram alert to admin when new orders arrive
When to disable: If you don't want to receive order notifications
Message Templates¶
Telegram supports HTML formatting in messages:
- <b>bold</b> for bold text
- <i>italic</i> for italic text
- <code>code</code> for monospace text
- <a href="url">link</a> for links
Customer Message Template¶
Type: Text Area Description: The message sent to customers when they place an order
Available placeholders:
- {customer_name} - Customer's name
- {order_id} - Order number
- {order_total} - Total amount with currency
- {order_url} - Link to view order details
Default template:
<b>Order Confirmation</b>
Hello {customer_name}!
Your order <b>#{order_id}</b> has been received.
Total: <b>{order_total}</b>
<a href="{order_url}">Track your order</a>
Thank you for shopping with us!
Tips: - Use HTML for better formatting - Keep it friendly and clear - Include order tracking link - Add your store contact info
Admin Message Template¶
Type: Text Area Description: The message sent to admin when new orders arrive
Available placeholders:
- {customer_name} - Customer's name
- {customer_phone} - Customer's phone number
- {order_id} - Order number
- {order_total} - Total amount with currency
- {admin_order_url} - Link to admin order details
Default template:
🔔 <b>New Order Alert!</b>
Order: <b>#{order_id}</b>
Customer: {customer_name}
Phone: {customer_phone}
Total: <b>{order_total}</b>
<a href="{admin_order_url}">View Order in Admin</a>
Tips: - Use emojis for quick visual scanning - Include customer contact info - Add direct link to admin panel - Use bold for important details
Best Practices¶
Setting Up Your Bot¶
Bot Name: - Choose a clear, recognizable name - Include your store name - Example: "MyStore Orders" or "MyShop Support"
Bot Username: - Keep it simple and memorable - Use your store name if available - Must end with "bot" - Example: @mystorebot or @myshop_order_bot
Bot Profile: - Set a profile picture (use /setuserpic in BotFather) - Add a description (use /setdescription in BotFather) - Tell customers how to use it
Message Templates¶
Do: - Use HTML formatting for clarity - Include order number for reference - Provide clickable tracking links - Add relevant emojis (not too many) - Keep important info bold
Don't: - Send long, unformatted messages - Forget essential order details - Use broken or invalid HTML - Overuse emojis (looks unprofessional) - Include sensitive data (passwords, full credit cards)
Customer Onboarding¶
To help customers receive notifications:
- Add instructions on your account/profile page
- Show them how to find their Chat ID (@userinfobot)
- Link to your bot directly:
https://t.me/your_bot_username - Send a welcome message when they start the bot
Privacy & Security¶
- Never share your Bot Token - anyone with it can control your bot
- Store Chat IDs securely in user profiles
- Don't send sensitive payment details via Telegram
- Comply with privacy regulations (GDPR, etc.)
Troubleshooting¶
Bot not sending messages?
- Verify your Bot Token is correct (no extra spaces)
- Check that your bot hasn't been deleted or blocked
- Try sending a test message using @BotFather's /mybots command
- Ensure you haven't hit Telegram's rate limits (30 messages/second)
Admin not receiving messages?
- Verify "Notify Admin" is enabled
- Check Admin Chat ID is correct
- Ensure you've started a chat with your bot
- Try the Test button to verify connection
Customer not receiving messages?
- Verify "Notify Customers" is enabled
- Check customer has saved their Telegram Chat ID in their profile
- Ensure customer started a chat with your bot
- Verify customer's Chat ID is correct
HTML formatting not working?
- Make sure you use valid HTML tags:
<b>,<i>,<code>,<a> - Don't use unsupported tags like
<div>,<span>,<h1> - Close all tags properly:
<b>text</b>not<b>text - Escape special characters:
<for<,>for>,&for&
"Bad Request: message text is empty" error?
- Check that your message template isn't empty
- Verify all placeholders are spelled correctly
- Ensure at least some text exists outside placeholders
"Unauthorized" error?
- Your Bot Token is invalid or incorrect
- Check for typos or extra spaces
- Generate a new token from @BotFather if needed
How Messages Are Sent¶
Messages are sent asynchronously using background jobs:
- Orders are created immediately
- Telegram messages are queued and sent within seconds
- If Telegram is temporarily unavailable, messages are retried automatically
- Failed messages are logged for troubleshooting
This ensures fast checkout even if Telegram delivery is delayed.
Telegram Rate Limits¶
Telegram has these limits for bots:
- 30 messages per second to different chats
- 1 message per second to the same chat
- No more than 20 messages per minute to the same group
The plugin handles rate limiting automatically, so you don't need to worry about it for normal order volumes.
Advanced: Testing Your Bot Manually¶
To test your bot directly without the plugin:
- Open this URL in your browser (replace
YOUR_BOT_TOKENandYOUR_CHAT_ID):
https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage?chat_id=YOUR_CHAT_ID&text=Hello
- If it works, you'll see JSON response:
{"ok":true,"result":{...}}
- If it fails, you'll see an error message explaining the problem
Related Resources¶
- Telegram Bot API Documentation
- BotFather Commands
- @userinfobot - Get your Chat ID
- @BotFather - Create and manage bots
- Back to Plugins