Is there a way to set up multiple Custom Triggers,...
# 🌎general
g
Is there a way to set up multiple Custom Triggers, each starting from a different flow?
a
I can't get it to work on my end. I've opened up an issue about this. Perhaps in the meantime, you could have one trigger in Main / somewhere else, that redirects the users to the correct flow
@narrow-orange-40460 this might interest you as well
Hey guys, I just realized it was my bad, there is a way to get this to work.
Assuming code like this to trigger it :
Copy code
window.botpressWebChat.sendEvent({
  type:'trigger',
  foo:'bar'
});
In your Main flow you can have a trigger like this

https://cdn.discordapp.com/attachments/1138102008260333709/1138125542382633011/image.png

and in the secondary one :

https://cdn.discordapp.com/attachments/1138102008260333709/1138125618937081978/image.png

The important thing here is that the order in which you create you trigger cards in botpress MATTERS.
so it's best to assume you triggers conditions may happen in any order.
That's why in main I check if the variable is set, because if it is, it's probably not main's job to take care of it (assuming "foo" pararmeter is the indicator for deciding which workflow to trigger)
n
Ok ! Sounds great, thanks for mentioning me, I’ll check it out as soon as I get home
ok, I'm trying this method out @acceptable-gold-88171 but I'm running into an issue. Because I'm waiting for a trigger payload, when I end the conversation and start it again (without the trigger) an infinite loop is detected and the process crashes
this is the start of my workflow:

https://cdn.discordapp.com/attachments/1138102008260333709/1138174822170501231/image.png

I would like to connect the 'organic' start to a different set of nodes basically
but I tried and things didn't work out
7 Views