Table Auth
# 🤝help
f
Hello! I need help achieving this: Only authorized numbers are allowed to enter the main flow. If the phone number is not authorized, then the conversation ends. My chatbot works on WhatsApp and Telegram. I understand that I can obtain the conversation's phone number from: {{ event.tags.conversation['whatsapp:userPhone'] }}. How can I obtain the same for Telegram? And how do I authorize based on a table? My table would have "name" and "phone number," and if the phone number is in the table, then it should say "Hello, {name}". How can I accomplish this?
b
the table should list non-authorized vs. authorized as structured data
so for instance you can create a table called authorized numbers, and have the bot check there first
and if a phone number doesn't appear, they can't proceed - wdyt?
f
Hi Robert! The idea is to have a table with 2 columns, "number" and "name", for example: Number: 1111-111 - Name: John. When interacting with the chat, whether through WhatsApp or Telegram, it should verify if the number matches any record in the table, and if so, use the corresponding name to greet the user. I understand that i have to create a table as described, and then have a node with the "Find Record" card with the filter: Get the value from the "name" column, for the value of the "phone" column {{ event.tags.conversation['whatsapp:userPhone'] }}. But I'm missing the validation part, if the user is not in the table, then ---> end. What am I missing? Thank you!
b

https://www.youtube.com/watch?v=XdkXkb9Az28

take a gander at this~
7 Views