Setting keywords

Hi there! I hope you can help me.
I need to set some keywords and when the user types or picks one of these keywords then I receive an email alerting me that user typed or picked one of these words.
For example,
keywords: danger, fear, etc
So when the chat asks something and user uses one of these words, I recieve an email as an alert.

I dont know if this is possible to do using only botpress. Anyway, if there is any way I can set the keywords I could do the email part on my backend.
Is it possible to do?

Hi @estebanmg27,

Yes it’s possible to do that with botpress !

You have multiple options to do that.

The first, I guess the simplest one is to make all this logic in an intent (alert_me for exemple).

  • In the intent, define a slot (I suggest you use enums) with the words you want => alert_words = ['sad', 'danger'....]
  • Then define utterances, it can be only one word (the alert_words) but you can also improve your bot by defining full sentence like : ‘I feel in danger’.

With that set up, the botpress brain (the NLU) will train on all that and will trigger the intent alert_me when a sentence is similar of one you put or when it detect a alert_word.

Then when the intent is detected, you can have custom code executed to send you an email.

The other method is to make a custom action/hook, without intents, just look the text received and if there is one of your keywords, use custom code to send you an email.

However, botpress have all the tools to make that for you (detect the enum and execute code).

I hop it helps

Happy building :robot: