https://discord.gg/botpress logo
Creating an webhook-triggered outbound messaging f...
# 🤝help
h
Hi there, I am trying to create an outbound conversational flow using a webhook event trigger. I can't seem to create a workflow that accepts user input stemming from the trigger since any replies from the first outbound message will move the state to the main start node, erasing the webhook's context that I need in the final step of my main flow. As a workaround, I've built a separate workflow for handling replies to the original outbound message, but I'd like to have access to values that were sent in the webhook. I tried connecting the trigger to a separate workflow using the workflow card and assigning the webhook payload data as "input variables" into the workflow, but I encountered my original problem of subsequent replies to the original message "breaking out" of the flow and moving to the main start node. I tried assigning them to a "User Variable" in the triggered workflow, which seems to be the correct scope, but then I can't access them in the main workflow. For more context, my use case is that when the webhook is triggered with client data sent in the payload body, it should text the user and ask them questions, using AI classification to update their individual database record with their responses. Is this something I can even achieve with the botpress platform or am I extending the capability too much here? https://cdn.discordapp.com/attachments/1367175245236273233/1367175245416370206/image.png?ex=6813a0ab&is=68124f2b&hm=2a12ce1fe0089f7d8052ec775fdf434f7ffc05a47b78ed74d0c9519655a92b37&
p
Could you send a report id so I can better evaluate the situation and how to advise you?
h
How can I do that? Sorry I am new to the platform.
p
No problem, here's how:
h
report_01JTK3ERJGB8HR42KNYH1W0V3F
p
I'm looking into it 🙂
h
Thank you so much! Please let me know if I can answer any additional questions. I know my request is a bit confusing.
p
No worries, I think my confusion comes mainly from the image being quite blury which is why I'd like to access your bot in my studio. Unfortunately, we seem to be having a little issue with that process at the moment so could you instead export your bot and send it to me privately? To export a bot click on the upper left Botpress logo in the studio and export as a bpz.
Alright, to answer your initial question about the variable, I do think storing event.payload from the incoming webhook into conversation variables rather than user variables might work better within the workflow. By having that data as conversation variables you shouldn't need to pass them as input variables, although that can only be beneficial. I haven't been able to open your bot, and thus to see what is currently in your execute code card after the trigger, but I believe assigning the payload to the variables there, would make the rest of your bot behave as expected. Hope this helps!
h
I have tried this approach already but this doesn't work because the conversation "ends" after the webhook event is triggered. A new conversation is "started" after the initial message from the bot is replied to. Again, this stems from the original problem which is that I can't seem to figure out a way to have an outbound conversation start from a webhook event, as required in my use case. (i.e. I send a JSON object to an endpoint with client information, and the bot reaches out to that client directly with an initial greeting message, then has a conversation, then updates a database with information gathered during the conversation) https://cdn.discordapp.com/attachments/1367175245236273233/1369454641904881674/Screenshot_2025-05-06_at_4.18.13_PM.png?ex=681beb85&is=681a9a05&hm=75e90e21449ab259e17a0a961d261dd44092d7ec4d63d78782c559159d7f55de& https://cdn.discordapp.com/attachments/1367175245236273233/1369454642299277373/Screenshot_2025-05-06_at_4.19.16_PM.png?ex=681beb85&is=681a9a05&hm=38084b3c9bf6be5cf7ba2a492f46394a14417def082d8be5091424eb7d5cb462& https://cdn.discordapp.com/attachments/1367175245236273233/1369454642672566372/Screenshot_2025-05-06_at_4.20.14_PM.png?ex=681beb86&is=681a9a06&hm=75ea40cc26bfe2344f07404dcda3faf0f10b018c396cefa4ed3a12fed9a35bbf&
Hey just following up on this- I still haven't been able to solve this issue and I'd hate to throw away all the work I've done setting this project up because I can't figure out how to get it done.
7 Views