Determining Telegram User Info

(sm sajad) #1


I am enjoying using flowxo, developing a simple bot for a friendly telegram group.
I am using the telegram inline keyboard, and then wait for a response, to get feedback from the users. I like to understand which user has responded to the query, but it seems like that user_id is not present in the metadata of Wait for a response.

Is there any method I could use to acquire that information?

(Nathan Stults) #2

Hi! Thanks for your question. The user ID is not in the metadata for Wait for a Response because it is the same user ID for the entire interaction. You can find the User Id in the “trigger” outputs, which for telegram will be the ID of the user you are interacting with.

(sm sajad) #3

Thanks, but no! In a group, someone might trigger the bot, but others might send replies in the following process, aren’t they?

I have just tested this with different users, and they of course can send messages to the bot.

In fact, I need the bot to be as such: An admin triggers an event, questionnaire, game, etc, and users participate in it.

(Nathan Stults) #4

Each use who interacts with the bot will trigger a new flow, with new metadata and information and User ID. There isn’t a way (at least in Flow XO) to design a flow that multiple users can easily interact with and maintain global state, sorry. You would need some centralized storage to coordinate between different users contributing to a single conversation if you want to somehow connect them.

(sm sajad) #5

That’s really unfortunate.

I had been able to store those interactions in a json attribute, and thaught that if I could obtain the user id, I could use this platform to develop my needs. Unfortunately, this means I should go and write my own code.

Thank you