Medusa Telegram Notification Plugin
The medusa-telegram-notification plugin allows Medusa Server to send push notifications to Telegram. It provides a simple way to integrate Telegram notifications into your Medusa Server application.
Installation
You can install the medusa-telegram-notification plugin using npm, yarn, or pnpm.
npm:
yarn:
pnpm:
Configuration
To use the plugin, you need to add it to your
file.Copy to clipboardmedusa-config.js
Make sure to replace
with the actual bot token for your Telegram bot. You can obtain a bot token by creating a new bot on the Telegram BotFather platform.Copy to clipboardprocess.env.NOTIFICATION_TELEGRAM_BOT_TOKEN
Usage
Once you have configured the plugin, you can use the provided sample code as a starting point for sending notifications. Here's an example of how to use the
class to handle an order placement event:Copy to clipboardMyNotificationService
The
class extends theCopy to clipboardMyNotificationService
provided by Medusa Server. It uses theCopy to clipboardBaseService
to send a Telegram message with information about the placed order. You can customize the content of the message according to your requirements.Copy to clipboardtelegramNotificationService
Additionally, you can use the
function from theCopy to clipboardtoVNCurrencyFormat
file to format the order total in Vietnamese currency (VND).Copy to clipboardcurrency.ts
Feel free to modify and extend the
class to handle other events or add more functionality as needed.Copy to clipboardMyNotificationService
Support
If you encounter any issues or have questions regarding the medusa-telegram-notification plugin, please open an issue on the GitHub repository. We'll be happy to assist you.
License
This plugin is licensed under the MIT License.

Build your own plugins
Develop your own plugins with our API to speed up your processes.
Make your plugin available via npm for it to be shared in our Plugin Library with the broader Medusa community.
.png)