https://discord.gg/botpress logo
#🤝help
Keyword recognition and image response
# 🤝help
f

few-apartment-55622

07/05/2023, 4:24 AM
Hey, I'm new to Botpress and I would like to create a feature where the chatbot can capture user input and look for a specific keyword, for example, if the user input content 🍕"pizza", the chatbot will respond to the user with a 🍕"pizza image" if no keyword "pizza" appears in user's input, the process will be skipped.
a

acceptable-kangaroo-64719

07/05/2023, 10:31 AM
Hey @few-apartment-55622, this is pretty simple to do using regex. You could make a transition like
/pizza/.test(event.preview)
to look for the literal word "pizza" in the user's phrase. You could also use an AI task to evaluate whether or not the user's message is about pizza, and save the results to a different variable.
37 Views