Strapi plugin logo for Telegram Bot

Telegram Bot

Telegram bot for sending messages.

Strapi v4 plugin: Telegram bot

Plugin Strapi for sending messages to a Telegram bot.


Table of Contents

✨ Features

The plugin allows sending text messages to site administrators. This will enable quicker processing of customer inquiries or orders.

⏳ Installation

Via Strapi Marketplace

Currently, this is not implemented.

Via command line

(Use yarn to install this plugin within your Strapi project (recommended). Install yarn with these docs.)

1  yarn add telegram-bot-strapi

After successful installation you've to re-build your Strapi instance. To archive that simply use:

1  yarn build
2  yarn develop

The telegram-bot plugin should appear in the Plugins section of Strapi sidebar after you run app again.

As a next step you must configure your the plugin by the way you want to. See Configuration section.

All done. Enjoy 🎉

🔧 Configuration

  • Register a Telegram bot using @BotFather
  • Add the received token to the .env file.
    1TELEGRAM_TOKEN=""
  • A plugin will appear in the Strapi admin panel.

    Plugin

  • In the plugin window, the name of your bot should appear. Name Plugin

  • Congratulations, everything is ready for use.

🖐 Using

  • Add the created bot to the contacts list.
  • Execute the command /start in the added bot. Start bot
  • Receive a message about successful registration. Registration in  bot
  • In the bot's window, click the Update list chats button.
  • The registered user will appear in this list. Update list chats
  • Edit the user's settings to allow them to receive messages. Enable chat
  • To send messages to all selected users, make a POST request.

    1http://[addres sever]/telegram-bot-strapi/send-message
    2
    3  {
    4    "message": "My first message"
    5  }
  • All activated users will receive the message.

  • In response, we will receive a message:

    1{
    2  "result": "Message send"
    3}

📚 References

Install now

npm install telegram-bot-strapi

STATS

7 GitHub stars11 weekly downloads

Last updated

472 days ago

Strapi Version

4.0.0 and above

Author

github profile image for Serhii Kostiuchenko
Serhii Kostiuchenko

Useful links

Create your own plugin

Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.