Services Plugins FAQs

Telegram - New Plugin from Zeroqode

@wwweb2401,

Мы поковырялись в вашем приложении, исследовали ваши настройки и провели мини-ресёрч первоисточников и вот что мы нашли:

  1. ваши настройки (вебхуки и проч) - в принципе предельно корректны, то есть со стороны баббл приложения настройки плагина у вас работоспособные. В таком случае, мы вам рекомендуем настроить вебхуки со стороны Телеграмма. Вот, прошу почитайте эти ресурсы:
    Telegram бот через webhook | Declaration of VAR

  2. если после настройки вебхука на стороне Телеграма у вас все равно записываются пустые данные в бд - пожалуйста, перепроверьте этот свой экшен:

Прежде чем советовать данный гайд, мы протестировали его на своей стороне и смогли успешно сохранить передаваемые данные:

postman, workflow, database

И еще одна полезная ссылка:

Надеюсь, что данная информация будет для вас полезной. :slightly_smiling_face:
С уважением,

@kate
Вы делали запрос (отправляли сообщение) из Postman и оно записывалось в базу. Когда я делаю запрос из Postman у меня тоже он записывается в базу.



Но когда я отправляю сообщение из Telegram оно почему то не записывается в базу.
Может при инициализации request нужно ввести какие то мои личные настройки?

@wwweb2401,

Нет, с инициализацией у вас все в порядке. Единственные 2 момента, которые мы вам настоятельно рекомендуем проверить, это настройка вебхуков в самом Телеграмме и ваш экшен, который записывает данные в бд.

С уважением,

Спасибо за ссылки я проверил 2 момента которые Вы мне рекомендовали, но они не привели к нужному результата. Ознакомившись из ссылкой которую Вы порекомендова́ли Telegram бот через webhook | Declaration of VAR я проверил статус вебхука и мне вернулся ответ что все хорошо


Также устанавливал вебхук в Postman
Но и после этого в базу записывались пустые данные
Я так же проверил экшен (миллион раз) который записывает данные в базу, он идентичный Вашему. К тому же по вкладке Logs видно что данные действительно пустые по этому и пустые значения записываются в базу
Когда я делаю запрос из Postman (как Вы это показывали вы на своих скриншотах) данные в базу записываются, а если пользователь отправляет сообщение из Телеграм то записываются пустые значения. Вы проверяли отправку сообщений непосредственно из Телеграм, они у Вас записываются в базу?
Также я нашел отличие в возвращаемых данных при инициализации.
Этим закачиваются данные которые возвращаются при инициализации Endpoint
А при инициализации моего Endpoint возвращаемые данные содержат тоже что и Ваши но плюс к тому они содержат еще один “headers” (один с данными zeroqode-demo-21.bubbleapps.io и второй younell.bubbleapps.io - это мое) .
Скрины при инициализации моего Endpoint:
Продолжение
Продолжение
То есть как видно из скриншотов в ответе присутствует два “headers”, может причина в этом? Если да то какое тело запроса нужно отправить в Postman при инициализации чтобы был один “headers”.

Я переписал тело запроса и снова провел инициализацию, теперь у возвращяемых данных один “headers” (моего бота)

, но результат тот же, если отправлять запрос из Postman запись в базе задается, а если из Телеграм то создается запись в базе, но пустая. Что делать, ума не приложу.

@wwweb2401,

Единственное что я могу посоветовать вам в данном случае - это обратиться в службу поддержки Телеграмма и Баббла.

Почему - эндпоинты и вебхуки это бэкенд, не относящийся к работе плагина. Когда вы пытаетесь записать данные в баббл приложение, используя вебхуки, - все связанные с этим проблемы - это, боюсь, уже проблемы на стороне Баббл Эдитора или Телеграмма (имеется в виду, что, скорее всего, проблема в самих передаваемых данных через вебхук).

Поэтому, так как ситуация, с которой вы столкнулись, касается по большей части самой платформы Баббл, мы можем вам порекомендовать обратиться в их службу поддежки и попросить совет по данным вопросам. Мы подтверждаем, что ваши настройки корректны и плагин работает нормально в рамках вашего приложения.

Прошу прощения, что не можем вам ничем больше помочь :pray:
Но, если у вас возникнут какие-либо вопросы по нашим продуктам - пожалуйста, сообщайте :slight_smile:

Контакты Баббл поддержки: https://bubble.io/contact
Котнакты Телеграмм поддержки: https://telegram.org/support

Надеюсь, что мой совет будет полезен для вас.
С уважением,

Для тех кто столкнется с такой же проблемой как и я, а именно - получения и записи сообщений, которые пользователи отвечаю Чат боту через приложение Telegram эта маленькая инструкция))) (может кому то пригодится).
После п. 6 инструкции от Zeroqode которая находится в верху темы рекомендую сделать следующие:

  1. создать вебхук

  1. Создайте рабочий процесс в котором уже подписанному на Бота пользователю отправляете сообщение и устанавливаете вебхук (в адресе вебхука в конце обязательно указать /initialize)

  1. После этого инициализируем вебхук. Жмем кнопку Detect data и в этот момент пользователь которому отправили в п. 2 сообщение отправляет сообщение Боту в приложении Telegram. Вызов инициализируется, сохраняем данные.

  2. Убираем в рабочем процессе описаном в п. 2 в адресе вебхука /initialize

  3. В вебхуке устанавливаем рабочий процесс для сохранение полученных сообщений в базу Bubble, также сохраняем пользователя который отправил это сообщение и другие данные по необходимости.

Все, вы можете не только отправлять со своего приложения сообщения пользователям в Telegram но принимать их.

2 Likes

Спасибо! Очень полезно.

Инициализация Endpoint через шаблон для Postman работает криво, скорее всего. Данные от самого Telegram в Webhook приходят по другому, не так, как от Postman, в результате по Webhook не удается ничего принять после инициализации через Postman.

После инициализации через запрос от Telegram (написав сообщение боту с включенным Webhook URL/initialize) - Endpoint стал работать и нормально принимать данные от Telegram.

Hello. Is it possible to get some kind of short guide on how to handle the start command. and in general, how can I understand that this user in the telegram is this user in the bubble

Hello, friends! :slightly_smiling_face:

We have just made a Telegram Bot plugin demo page redesign. Please check it out:
https://zeroqode-demo-21.bubbleapps.io/telegram_demo_page

We hope now it will be much more convenient for you guys to configure the plugin, using this demo + documentation. :tada:

Cheers!

Hello, I installed telegram bot plugin.
Everything works fine. But the question is how to get images from users and save it to bubble database?
I got file_id parameter from the bot but how to get image url using that file_id?

Hello @Zholdasbek

Thanks for reaching out.

I’ll discuss the question with our developers and I’ll get back to you once I have an update regarding your request.

In case you have any other questions, simply let me know :slight_smile:

Hi there! I’m really interested in this plugin and have some questions I hope the team can answer.

  1. Will this plugin allow me to receive updates/responses from users whom I have sent out messages to? For example, if I were to send out polls to 100 users, will their responses be captured and stored in Bubble for me to access?

  2. If my app does not ask for users to log in with telegram, can my bot initiate a conversation with them? I am aware I require the user_id to send them messages but can only obtain this if a user starts my bot. So does this plugin capture users who have started the bot to store their user_id? Or will their phone number suffice?

  3. Will the team be setting up a youtube tutorial on how to set this up! It seems super useful for many users but the setup can seem a bit daunting for new users. Hope you guys will consider making such tutorials.

Thanks in advance for replying me :slight_smile:

Hi @zachary

Thanks for reaching out.

Yes, almost any data can be saved to the database using the data call - Get Chat Info, and then can be saved using the standard Bubble’s functionality by creating a new thing or any other convenient way.

The ID of the people is only shown after the user sends a message to the bot (it’s the settings that are related to Telegram itself and not controlled from our plugin).

At the moment, we do not have plans to create specific tutorials for the plugins, but we will definitely take your suggestion into consideration and I will pass the suggestion to our team :slight_smile: As for now, you can access our documentation, which explains how to set up the plugin: https://docs.zeroqode.com/plugins/telegram-plugin

Please let me know if you have any other questions.

Have a great day :slight_smile:

Hey thanks for the reply, it was really helpful!! Just a few other questions from me to try and get a full picture:

  1. My website wishes to allow Merchants to create profiles and use my platform to interact with their own customers. So, each Merchant will ideally have their own Telegram bots/channels. Will this plugin allow me to build a website where it can handle communication to multiple telegram bots? Of course, I would require all Merchants to enter their bot token to my website but can I use dynamic data (indicating their tokens) to manage multiple bots?

  2. Is it possible to schedule events using this plugin to happen on Telegram – For example: Can this plugin automatically send a poll 2-hours before a customer’s designated time slot and reflect the customer’s response on Bubble? (like a “yes”/“no” response)

  3. Can each Merchant customise the kind of keyboard/response options to be shown in the messages sent through their bots? For example: Can a merchant choose to send a Yes/No Poll to the telegram user?

Thanks for the questions :slight_smile:

It can definitely be set up through Bubble, you set up groups in which there are different elements and groups. Depending on the conditions and requirements, the bot key is can be dynamically set up. Then the merchant can work with the selected bot. Even though it is not the easiest process to set it up, with solid Bubble skills this use case can be implemented.

This functionality is related to Bubble, and it can be set up with Bubble’s deferred workflows.

We believe it can be done, and this functionality can be found in the settings of the bot, you can check the settings and learn more about it here: Bots: An introduction for developers

In case you have any other questions, simply let me know :slight_smile:

Have a great day!

Thanks for your patience @Zholdasbek

I would like to let you know that we have updated the plugin and added new calls to receive and download the photo from the users. Please update to Version: 1.9.0 and let me know if everything works well :slight_smile:

In case you have any questions, simply let me know.

Hello, I have purchased the plugin and manage to get some success with it. I have managed to send myself a message through my own Telegram bot because I know my own chat_id/user_id. May I know how do I get Bubble to create a new Telegram User in my database whenever someone starts the bot? i.e. I want to be able to store all user_id when a new user starts my Telegram bot. Couldn’t find some documentation on receiving data so I hope you can help me :slight_smile: :grinning:

You can receive the data using the “Get chat bot info”, the results of the ID’s can be displayed in the repeating group and then added to the database using bubble’s ‘Create a new thing’. Please see our demo editor for an example on how you can use the data calls and plugin’s actions:

In case you have any other plugin related questions, simply let me know :slight_smile:

Have a great day!

Sorry :sweat: I do not understand the steps. I have tried to replicate the screenshot provided and even tried to copy the demo groups. However, I still cannot get my page to display any data. I have deleted my copy from the demo page and simplified to something similar to the screenshot provided by you.


Here is just the barebones of what I tried to achieve. The ‘send’ button ONLY sends a message (“hello” to the existingUserId via the TestBot. Other than that, I have tried to recreate the repeating group like you showed to display a list of the current page’s bot info. but nothing appears. Can I know where I have gone wrong?

Edit: I see on the demo page that there is a content type ‘Grouping’. However, I do not get that option and I am unable to select Parent Group’s grouping for example. How did you achieve this?

Edit 2: I realise now the problem may not be illustrated clearly. I will try and provide a step-by-step of what I did by replicating the demo page (just to get some data reflected on my page). Maybe I missed some step out or did them incorrectly. I will try to provide screenshots of how I have followed the documentation. Hope this makes it easier for your team to help me out.

Thank you so much for taking the time to walk me through this plugin. It is greatly appreciated and I wish to showcase the power of this plugin successfully on my website.