https://discord.gg/botpress logo
How to make the bot understand the first message f...
# 🤝help
r
We have intergrated our bot to whatsapp, and we did in our campaigns that it will send the first message (with 3 buttons) in Make, for example: now,later,next week Every thing is working on both sides but we want that the bot will catch the answer the user picked from the first message that it gets from MAKE. now it just continues to the greetings but don't catch this answer. what do you recommend? we have tried to inject at the start of the gretting node: and expression of: event.preview === 'now' and a intent of: now (our meaning is to make little some of seperation only when the user interacts first time in whatsapp) https://cdn.discordapp.com/attachments/1263495686368919616/1263495687031754864/image.png?ex=669a718e&is=6699200e&hm=5d753854268aa0313ef4eb7d91b9f5f3c1e76aee3aa769bc0976c0cd198058ff& https://cdn.discordapp.com/attachments/1263495686368919616/1263495687333609572/image.png?ex=669a718e&is=6699200e&hm=6250002b3dac0cecae726ed42211dc0b334b85fa698421503398c0b5162a6622&
goes through the start
l
is response from make received at botpress?
In my first node connected to START, I have this code, to capture the first response received const payloadText = event.payload.text switch (true) { case payloadText.includes('afmadmin'): workflow.usertype = 'admin' break case payloadText.includes('START'): workflow.usertype = 'START' break default: workflow.usertype = 'user' } which then uses expression to follow different route
r
yes its the first message after someone is submiting our lead ads
this code is to capture it?
l
yes
try it
in my clients' case if they send "afmadmin" - it starts the admin workflow or if they send "START", it triggers user workflow. for customers, it goes to regular workflow
r
its working only on emulator not on live whatsapp
l
did you publish?
r
yes
even added a small text message just to see on live
still skips it 😤
I saw a lot of agencies doing this thing cant understand why its not working
But i must say it works on emulator
wierd
@bumpy-butcher-41910 May be you know how to solve it?
I tryied to use webhooks,code, more nodes. none helped with this first message from MAKE
r
its working for you in whatsapp?
l
Yes
r
after you send the first message from MAKE?
does not matter where you send it from
r
it works only when i just type
at start
but not from the make message
this one
Damn it is frustrating
Someone told me to use somehow a webhook from make to trigger it, dont works too..
@limited-pencil-78283
l
I cant comment without seeing the data coming from make. I know it is working from you, when you type the message
r
Ok in make i have done this:
and the message is a interactive one with text and 3 buttons
Something very simple nothing too complicated
l
here in the Determine user type. can you write console.log('Payload Data ', event.payload) and show me the log when you send message from make
l
check DM
r
Solved with @limited-pencil-78283 👑 ✅
b
Hi Team, I have integrated Bot Press with Slack. When added to a Slack channel, it perceives every message shared in the channel as a question. Can some one help me with a work around to answer only if the chatbot is called out in the slack channel?
l
Any bot in a group will be listening to every conversation and it will react. You need to define when the bot will respond and when it will not
b
l
firstly there is no effective way for the bot to know when it needs to respond and when it should not, as it is part of the group, it will receive every message in that group. Since you mentioned "answer only if the chatbot is called", check if the event.payload contains the name of the bot, else ignore the message. But it is not going to be very effective, every time someone will have to explicitly call the name for the bot to respond @fresh-fireman-491 do you have ideas?
f
@bored-twilight-94902 can you make a separate post about this new problem so its a bit easier to help you
2 Views