https://discord.gg/botpress logo
Webchat + Custom trigger - how will this work?
# 🤝help
c
I want to embed the chatbot into my GoHighLevel landing page. I created a script that receives data from URL parameters and from the GHL landing page, and the value landing: 'profenzo_ghl_lead' is hardcoded so I can route the conversation into a specific workflow. It's also important that when the page loads, it immediately opens the full chat window and automatically sends the first message from the workflow. This worked until a few days ago, but now it doesn't work at all. This is the script I was using: I attached
According to the Botpress log, the data arrives: I put an Event Filter in the Custom trigger, but it doesn't forward it in the workflow: {{event.payload.payload.landing == "profenzo_ghl_lead"}}
w
i think its event.payload.landing
i dont think payload should be duplicated like that
based on the structure
w
oh ok i know the problem
it shouldn't be {{event.payload.payload.landing == "profenzo_ghl_lead"}}
it should be {{event.payload.payload.landing}} == "profenzo_ghl_lead"
c
Sorry, I don't understand this...
It doesn't let me proceed in the workflow with this either: {{event.payload.payload.landing == "profenzo_ghl_lead"}}
It doesn't let me proceed with this either: {{event.payload.landing == "profenzo_ghl_lead"}}
w
yes because it's wrong as i said above
the correct is {{event.payload.payload.landing}} == "profenzo_ghl_lead"
c
Unfortunately, it doesn't work with this either, I just tested it. 2025. nov. 2. 22:14:33 [25d2031fa2] [dm] : Event of type webchat:trigger received. 2025. nov. 2. 22:14:34 [5ed494a125] [dm] : Event of type webchat:conversationStarted received. 2025. nov. 2. 22:14:34 TypeError: Cannot read properties of undefined (reading 'landing')
w
is the correct event selected in the test?
c
Could you explain this in more detail? How should I select the event?
w
in your test trigger
c
Well, what can I say... OMG it looks like I was the ... again. 🙉 Somehow I placed a ConversationStarted trigger, and not a Custom trigger.
w
OH lol haha
c
Thanks a lot! 😂
Now it forwards it in the workflow, but this is the correct Event Filter: {{event.payload.payload.landing == "profenzo_ghl_lead"}}
w
In the event filter, the
{{ }}
brackets are unnecessary.