Hey everyone,
I’m using a Webhook Custom Trigger in Botpress to receive a JSON payload from an external system called Postman. The trigger fires correctly, the flow starts, and I get the initial greeting message from the bot.
Right after the trigger, I use an Execute Code card to extract the payload and store values like invoiceNumber, rejectionReason, invoiceDate, etc. in conversation. or session. variables.
I also manually assign event.userId and event.conversationId from the payload.
The problem:
As soon as the user sends a message (e.g. "Why was my invoice rejected?"), Botpress logs Conversation started and jumps back to main.flow.json.
At that point, all variables stored in conversation. or workflow. are lost.
What I’ve already tried:
-Setting event.userId and event.conversationId immediately after the webhook
-Confirmed that the payload is received and values are correctly stored before the jump
-Tried storing in both conversation. and workflow. scopes
Goal:
I want to store contextual data from the webhook and keep it accessible across flows, even if the conversation transitions. How can I ensure the data persists and the conversation doesn’t reset unexpectedly?
The user who solves this problem gets 15€ on paypal, I'm that desperate 🥲
Thanks in advance 🙏