WhatsApp Trigger Action
# 🤝help
a
I have a question which might be easy for most but i couldn't get my head round it... newbie here btw... Trigger: as I'm building a whatsapp chat bot... I only want my chat bot to trigger a conversation ONLY when the customer message me containing a certain phrase... like... "Hi, BOT, " The standard message coming from the customer is always like "Hi, [name], i'm interested in blah blah blah... from the link.... blah blah blah.... etc" (because it comes from another platform with automation sending whatsapp messages to my client)... So I want the chat bot in WhatsApp THAT ONLY replies when it see a message like "Hi, [name]," and then the Chat Bot will be activated and start the conversation. Any messages that doesn't starts with this, chat bot will be inactive and my clients can use their WhatsApp as per normal chatting with their contacts. How do I go about doing this?
a
This seems like a good start but can explain a little on what is this?
l
In event.payload.text you will receive the user input. Per your requirement, if the user types the desired message you can proceed with the flow, else end the flow. In my case, I am using a switch case as I am handling different messages to perform different action
a
Thank you so much for this... i will test this out... but isn't the Trigger action suppose to be able to do this task as well? I'm asking is because if I would like to trigger other flow based on phrase, i will be coding like this all the time?
l
I haven't tried, let me know if you are able to get it done using trigger
a
still having issues with the code... still trying to get it work...
l
Please share your code
a
managed to got it to work now! finally.
but i have another issue... there's a message that it repeats the previous reply...
@limited-pencil-78283 but really appreciate your efforts in helping... 🙂