Keyword recognition and image response
# 🤝help
f
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
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.
81 Views