Skip to content

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

  1. Open Telegram and search for @BotFather
  2. Start a chat with BotFather
  3. Send the command: /newbot
  4. BotFather will ask for a name for your bot
  5. Enter a display name (e.g., "MyStore Order Bot")
  6. BotFather will ask for a username for your bot
  7. Must end in bot (e.g., "mystore_order_bot")
  8. Must be unique across Telegram
  9. BotFather will create your bot and give you an API token
  10. It looks like: 123456789:ABCdefGhIJKlmNoPQRsTUVwxyZ
  11. 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)

  1. Open Telegram and search for @userinfobot
  2. Start a chat with the bot
  3. Send any message (like "hello")
  4. The bot will reply with your user info
  5. Copy the Id number (e.g., 123456789)

Method 2: Using @chatIDrobot

  1. Open Telegram and search for @chatIDrobot
  2. Start a chat with the bot
  3. The bot will automatically send your Chat ID
  4. Copy the number

Method 3: Manual method

  1. Send a message to your bot (the one you created in Step 1)
  2. Visit this URL in your browser (replace YOUR_BOT_TOKEN): https://api.telegram.org/botYOUR_BOT_TOKEN/getUpdates
  3. Look for "chat":{"id":123456789}
  4. Copy the id number

Save your Chat ID - you'll need it in Step 3.

Step 3: Enable the Plugin

  1. In your store admin, go to System Settings > Plugins
  2. Find the Telegram Notifier card
  3. Click Configure
  4. Enable the plugin using the toggle switch
  5. Fill in the configuration fields:
  6. Bot Token: Paste the token from Step 1
  7. Admin Chat ID: Paste the Chat ID from Step 2
  8. Configure notification settings and templates (see below)
  9. Click Save

Step 4: Set Up Customer Notifications (Optional)

For customers to receive notifications, they need to:

  1. Find your bot in Telegram (use the username you created, e.g., @mystore_order_bot)
  2. Start a chat with the bot (click "Start")
  3. Add their Telegram Chat ID to their account in your store:
  4. Customer goes to their account settings
  5. Enters their Telegram Chat ID
  6. Saves their profile

Note: Customers can get their Chat ID using @userinfobot (see Step 2).

Step 5: Test the Plugin

  1. Click the Test button on the plugin card
  2. The system will send a test message
  3. 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:

  1. Add instructions on your account/profile page
  2. Show them how to find their Chat ID (@userinfobot)
  3. Link to your bot directly: https://t.me/your_bot_username
  4. 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?

  1. Verify your Bot Token is correct (no extra spaces)
  2. Check that your bot hasn't been deleted or blocked
  3. Try sending a test message using @BotFather's /mybots command
  4. Ensure you haven't hit Telegram's rate limits (30 messages/second)

Admin not receiving messages?

  1. Verify "Notify Admin" is enabled
  2. Check Admin Chat ID is correct
  3. Ensure you've started a chat with your bot
  4. Try the Test button to verify connection

Customer not receiving messages?

  1. Verify "Notify Customers" is enabled
  2. Check customer has saved their Telegram Chat ID in their profile
  3. Ensure customer started a chat with your bot
  4. Verify customer's Chat ID is correct

HTML formatting not working?

  1. Make sure you use valid HTML tags: <b>, <i>, <code>, <a>
  2. Don't use unsupported tags like <div>, <span>, <h1>
  3. Close all tags properly: <b>text</b> not <b>text
  4. Escape special characters: &lt; for <, &gt; for >, &amp; 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:

  1. Open this URL in your browser (replace YOUR_BOT_TOKEN and YOUR_CHAT_ID):
https://api.telegram.org/botYOUR_BOT_TOKEN/sendMessage?chat_id=YOUR_CHAT_ID&text=Hello
  1. If it works, you'll see JSON response:
{"ok":true,"result":{...}}
  1. If it fails, you'll see an error message explaining the problem