How to implement user notifications in botpress

I would like to integrate botpress with jenkins. Jenkins is a continuous integration system that executes builds for configured jobs. If the user interacting with the bot states that he wants to be notified when the current build of ‘X’ job completes, I would like to push a message to the user on build completion. To do this, I would like to understand how can I implement this capability with botpress.

1. Can botpress server store the state of every user interaction in order to understand which user chats need to be notified?
2. Can botpress server listen to external events by receiving HTTP post requests? In my use case, jenkins can send a HTTP POST request to a configured url on every job completion.
3. On receiving an external event, how would the botpress server parse it and notify active user chats about the event?

Kindly let me know your thoughts on this

  1. Yes every events are persisted in the database in the events table

  2. Yes, for this you’ll need build a custom module and register a simple http router for your bot. Configure your jenkins to hit this route on events.

  3. You’ll receive your events in your http handler, it’s your job as a developer to implement event parsing and so on. To send an event back to the corresponding user, find the user, then use the botpress event sdk to send an event to the user.

Thanks for the inputs. Reading up more on this I found the user tagging capability in botpress. Hence we could add a tag once the user asks to notify him on a certain operation and untag him once the notification is sent. We could find all users with a given tag which is useful too. Do you see any issues with this approach?


If by user tagging, you mean using user attributes, then yes that could work for sure

I am referring to this tagging capability -

Is that the same as user attributes?


You are referring to outdated docs, we’re talking about Botpress1 and current version is 12.1.3. Please refer to the current docs and current user sdk reference