Link to plugin page: https://zeroqode.com/plugin/telegram-1519019646265x950432348785868800
This plugin allows you to build Telegram bots by sending messages, photos, music to a chat with the user.
You must have an account with Telegram to interact with the Telegram API. Create your development account: https://core.telegram.org/
After installing the plugin, please insert your API key in all the parameter fields that you see on the plugin tab.
The steps on how to get the Key are presented on the Demo page.
You will not be able to receive updates using getUpdates for as long as an outgoing webhook is set up. For details please check here: https://core.telegram.org/bots/api#getting-updates
3. Click on the pages menu - “Backend workflow” and go to “API workflow” page
4. Add a new endpoint and type a name for it (this will be the webhook for Telegram to which it'll connect to - https://core.telegram.org/bots/webhooks)
5. Click on the endpoint and then click “detect data”
6. Copy the link
7. Install postman on your computer and then import the collection:
8. In the call that you see replace the URL with the one you copied from the detect data and initialize the call.
9. You should see a success confirmation in the postman window.
10. On the Telegram side use setwebhook call to tell Telergram which URL should be used for webhooks (Note: it’s the same that you used in postman but without “initialize” at the end on the Telegram side). More info on how to work with Telegram webhooks (https://core.telegram.org/bots/api#setwebhook and here https://core.telegram.org/bots/webhooks) When using sendmessage (https://core.telegram.org/bots/api#sendmessage) call you have a few options for the replymarkupfield (which is optional)
Main options are: 1. 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
2. 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
You're all set to send and receive data from Telegram
To see how the Webhook is set on the Demo page please check backend workflows.
Bubble Editor: https://bubble.io/page?type=page&name=telegram_demo_page&id=zeroqode-demo-21&test_plugin=1518632973741x392118274806513660_current&tab=tabs-1
Try Telegram Bot: telegram.me/zenifybot