We have just published a plugin for Telegram that allows you to build Telegram bots by sending messages, photos & music to a chat with the user. Along with messages, you can send custom keyboards or reply options for making the experience more natural. It also allows to set webhooks for receiving updates back from Telegram chats into your Bubble app.
To see this plugin in action check out and install this meditation bot Telegram: Contact @zenifybot
Here is the plugin page on Bubble: Telegram Bots Plugin | Bubble
Instructions
- after installing plugin, please insert your api key in all the parameter fields that you see on the plugin tab
- go to your app settings - > API → and click on “this app exposes a Workflow API”
- click on the pages menu and go to “api workflow” page
- add a new endpoint and type a name for it (this will be the webhook for telegram)
- click on the endpoint and then click “detect data”
- copy the link
- install postman on your computer and then import a collection from this link https://www.getpostman.com/collections/463073462d41f9455e6e
- in the call that you see replace the URL with the one you copied from the detect data and initialize the call
- you should see a success confirmation in the postman window
- use setwebhook call to tell Telergram which URL should be used for webhooks (it’s the same that you used in postman but without “initialize” at the end
when using sendmessage call you have a few options for the replymarkupfield (which is optional)
main options are:
inline keyboard (shows buttons right next to the message)
here is a sample syntax
{ “inline_keyboard”: [[ { “text”: “I’m ready, let’s get started”, “callback_data”: “readytostart” }] ] }
you can add more buttons in a row and have a few rows of buttons
custom keyboard (shows custom keyboard with buttons instead of the regular keyboard)
sample syntax
{ “keyboard”: [[ { “text”: “Done” }] ],“one_time_keyboard”:true }
same here, you can add more buttons in a row and have a few rows of buttons
that’s it, you are all set to send and receive data from Telegram
Should you have any questions, post here
Levon Terteryan
Founder @ Zeroqode & Bubblewits
let’s stay in touch on twitter!
Bubble Templates
Bubble Plugins
Bubble Courses
Convert Web to iOS & Android
No-code Development Services