https://discord.gg/botpress logo
Cannot get custom trigger to receive my event from...
# 🤝help
b
The official docs contain a mixture of v1 and newer documentation, e.g. https://botpress.com/docs/events-3 appears to be v1. I couldn't find explicit documentation for the API for JS library v2.3 (I'm using https://cdn.botpress.cloud/webchat/v2.3/inject.js. I'm relying on the little info in the official docs that isn't v1. I couldn't find any documentation on how to use the filtering expressions on a custom trigger. I am trying to trigger the bot and print out what was sent in the payload. This is loosely based on

https://www.youtube.com/watch?v=qLwe7C00xbg&ab_channel=Botpress▾

but this is an old recording and I'm using the newer inject.js library. According to the events dashboard, I am sending the event successfully, but the custom trigger doesn't seem to process it, or the following node which prints out the value in the payload doesn't get run. I can't see anything wrong with how I've implemented this simple process. Could limits on my account be preventing processing events? I am at 99% of table space used, but I'm not using the tables in my workflow. https://cdn.discordapp.com/attachments/1361359603073421392/1361359603664814202/image.png?ex=67fe786e&is=67fd26ee&hm=3a2479104d9e2522dcb947cb7dcdcc344cdc4ce09f28996286ec546f00238808& https://cdn.discordapp.com/attachments/1361359603073421392/1361359604348489919/image.png?ex=67fe786e&is=67fd26ee&hm=96290b8ddbb5d872f808b88257d1c309577b24c442af8a258d87ec7d4c963f26&
w
you need to enable the trigger use the top right slider
if you don't use a filter the trigger starts every events, if you need to have different events that do different things add to your payload one or more fields to use in expression. I usually add a
type
field with a string key and my expression is something like this: *
event.payload.payload.type === 'urlDataChanged'
*
event.payload.payload.type === 'orderButtonClick'