execute nickname telegram chatbot
# 🤝help
e
Hello guys, is there a way to retrieve the Telegram username of the person chatting with my chatbot using execute.
a
Hey @enough-farmer-72041 usually channel info like that is kept in the
event.tags
variable. You can use a code card to log it with
console.log(event.tags)
and then check out the logs to see what is stored there.
> To get the Telegram user ID, you can read the following variable: {{ event.tags.user["telegram:id"] }}.
e
I explained myself poorly, sorry. I wanted to know how to get the username instead of the ID @acceptable-kangaroo-64719
with this i get the id number
but i want to get this
a
that might also be in
event.tags
, have you looked at what all is included in that object?
s
Hey @acceptable-kangaroo-64719 ! I have the same problem. Logically it has to be stored in event.tags.user["telegram:username"] but it isn't. I'm trying to store it in workflow.username:
workflow.username = event.tags.user["telegram:username"]
and what returns is just "@"
e
me return this " "
a
Looks like the telegram username is in the payload, not in the event.tags object. Have you tried taking the username from there?
b
hi, I also want to extract the username from the payload, but I can't find it in {{ event.tags.conversation}} and in {{ event}}. where to look? please tell me how can I extract username or other data that I receive in Handler? in Handler I see all the data I need, but I don’t understand how to extract it into a variable
3 Views