Services Plugins FAQs

Telegram - New Plugin from Zeroqode

I have tried to implement my creation of “Telegram Users” at the page by scheduling a workflow to occur every 3 seconds. However, here are some issues that I am facing:

  1. The creation of the “Telegram Users” are looping non-stop despite my condition.
  2. For every “Get bot chat info”, does every single incoming message from Telegram = 1 “Get bot chat info” result/object? I am unsure if the ‘first item’ or ‘last item’ gets me the MOST RECENT Telegram message data.
  3. In some scenarios, I am skipping the creation of some Telegram users. For example: User A starts the bot and a new Telegram User “User A” is created. Immediately after, before 3 seconds, User B starts the bot. Right after this, User A messages the bot again. Now 3 seconds is up and the scheduled workflow runs again. The “Get bot chat info” will only get the latest message (i.e. from User A) and skips the creation of User B. How do I ensure that a new Telegram User is created for every new Telegram User ID?
    For reference: here is my snapshot of what I tried to do. Please point out where I have gone wrong (because I know this is so…wrong)

The condition is “Search for Telegram users count is 0” so when there is already one user registered in the database it will stop registering the users. I advise you to change this to check if the unique ID is present in the database and if it is not create a new user.

The “last item” is the most recent telegram message data. Please see this Bubble’s information regarding last, first item: Operators & Comparisons - Bubble Docs

As I have mentioned previously you should probably create a state that will check if the ID is present in the database first. When a condition is true, create a new thing only when telegram users do not contain an “existing” user ID.

I will check the request with a developer to see what can be done in this case, and I’ll get back to you.

Thanks.

Does zerocode offer support or they just build template to frustrate people because I do not understand why its so easy to buy a product but so hard to get one person to tell you a thing about the product not everyone here has $5000 to customise templates so when you build them advise us that you do not give support

you should try reaching out on this forum and explain in detail what issues you’re facing!! The support team replies within a day or two and usually lead you to the right solution if they understand your problem well enough. Give it a shot

1 Like

My search does this: Search the data base for Telegram user where the Telegram User ID = the ID obtained from this “Get bot chat info”'s last message. So in essence, it only creates when the ID does not exist in my data base. Also, this doesnt really fix the problem where the creation of a Telegram User may be skipped because it is the second-most-recent message.

Please let me know if I understood your request correctly. You would like to register the user as soon he writes /start, and register that message in the database? Also, when another user writes to the bot, register his ID and his message too?

If this is the issue you are experiencing, I’ll try my best to find the solution to the problem, but I would like to let you know that the issue is unfortunately out of my expertise and support responsibilities, and it is mostly related to Bubble’s functionality and customization.

Sorry for this inconvenience. As soon as I have any news or solution, I’ll get back to you.

Take care.

Hi @Kirill thanks so much for the help.
Yes, when a Telegram user starts the bot, I would like to create a new “Telegram User” data type in my data base. This Telegram User should also be tagged to that specific bot (it can be done by tagging this user to the specific bot token or something).
Also, whenever a user responds/messages the bot, I would like to know which bot has this user responded to.
Once again, thank you so much for the support!!

1 Like

I am afraid we won’t be able to provide step-by-step instructions, since your use case is mostly related to Bubble’s functionality which is out of our expertise, however, I’d still like to provide you with the valuable information that will hopefully allow you to set up the bots as you need to.

Each telegram bot has its own API Key, and when we receive information from some bot, we indicate this key. Accordingly, in workflows, we can specify the name of this bot, or we can save the data to the database by creating a new thing, this will allow us to understand of what kind of bot we are referring to.

Regarding the webhooks, these are created for a specific bot, also with an indication of its key, and then accordingly, we get the events of that particular bot. Thus, we can again set up the workflow with the name of this bot, whose info we received. Since each bot has its own key, you can configure the workflows in such a way that it understands which bot is being used.

Hopefully it helps :slight_smile:

Have a great day.

Hi @Kirill thanks for the reply!! I understand and would like to thank you again for your efforts.
If I set up all telegram bots to have the same backend end point, is there no way for me to detect which bot the messages are sent to?
To illustrate this:
I am setting all my bots to have this endpoint as their webhook


And the data that I can detect is as follows
image
From this, whenever a Telegram user messages any of my bots, I am able to create a new “Telegram User” data type in Bubble’s database by doing something like this

May I confirm that through this method, I will not be able to detect which bot each detected data is tagged to?

Hi @zachary

You can use the body’s ok or body chat id field from this list, both of these showows the message has been sent.

If you have any other questions, just let me know :slight_smile:

Have a great day.

Okay thanks so much for all your support thus far @Kirill and Zeroqode Support Team!! Should I have any clarification, I’ll be sure to drop you a message here.

3 Likes

Hi guys, I wish to execute an action ONLY IF “Telegram - Send Message” was executed (successfully).
image
I am trying to base my workflow to execute only if result of step 1 has been done. Which of the following fields should I use to check if “Telegram - Send Message” was executed

Hi @zachary

Thanks for reaching out.

You can use "body’s ok" and “message_id”, both of these values show that the message has been sent.

If you have any other questions, just let me know :slight_smile:

Have a great day.

if unsuccessful, what will both “body’s ok” and “message_id” show? thanks kiril

Unfortunately, I do not quite understand your request @zachary, can you please clarify it and elaborate on your question?

The “body’s ok” can be used to show if the message has been sent. For example, you can show an alert, to notify the user that the message has been sent, only when the result of the “body’s ok is yes”.

Please let me know if it is something that you were asking about :slight_smile:

Looking forward to your reply.

Yes you have clarified my query!! Thanks @Kirill
By the way, how can I receive poll results? Currently my Request Data’s Response object only has the following fields:
image
and
image
However, I am aware that Telegram also provides results of polls once you set up the webhook:


I have clarified with the team before and they have said that it is possible to get Poll results. How do I make it such that my data detected also has a poll object?

Thanks for the question!

I’ll have to check your request with the team and I’ll get back to you shortly :slight_smile:

Thanks for your patience and apologies for taking so long! @zachary

We have decided to update the plugin with new calls such as “Send poll” and get chat info by ID. Please update to Version: 1.10.0.

To get the poll results(via webhook) you would have to do the following.

  1. Set the webhook on the page
  2. Send a poll via an action
  3. Click detect data (in the backend workflows)
  4. Save the information received to the database
  5. Show the information on the page :slight_smile:

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

Thanks.

Hi everyone! :slightly_smiling_face:

We have updated our Telegram Bots plugin with the new feature :tada:
Now it is possible to send a message to a Group. Test it out on our demo page:
image

Hope you find it useful for your apps. :wink:
Cheers!

Hi Kate, I found this plugin really helpful. Just bought it to use the send messages in groups, but it’s not working for groups right now. Any help please?