https://discord.gg/botpress logo
Save Whatsapp number as user arrives
# 🤝help
b
I integrated it with Whatsapp and everything is working ok. I would like to capture the user's phone number as soon as the contact arrives, without having to ask for this information. I tried using "event.tags.conversation['whatsapp:userPhone']" to assign to a variable, but I was unsuccessful. Does anyone have a working method to save the customer's WhatsApp number? Thanks
Everything I found about it was the same information I found in FAQ, witch say that we have to use the "event.tags.conversation['whatsapp:userPhone']" variable, but I'm not been able to do so, cause it shows a message like "evaluated to undefined". I'm pretty sure I'm doing it the wrong way. I'd really appreciate some help... Thanks again
l
The information is correct. Where are you testing it? Can you share a log on console.log(" WA Number ", event.tags.coversation['whatsapp:userPhone'])
b
I first tried to create a workflow variable to "grab" the number but I've just put the "event.tags.conversation['whatsapp:userPhone']" variable directly into the script that sends information out to the Make webhook and it worked just fine... https://cdn.discordapp.com/attachments/1257713939303891125/1257776235837128714/image.png?ex=6685a2e6&is=66845166&hm=79568992e6848dc758c2631106c69dda34bd5ceff08b8db07fae5a3d55402279&
b
Ok, thanks. I really just needed to send it to Make's webhook, so the way it ended up was the better after all...
l
This should have worked
So is this
But first we need to know if there is any value in the tag
Else neither will work
2 Views