https://discord.gg/botpress logo
webhook + callback
# 🤝help
f
Hi, I’m trying to integrate Botpress with a Node.js backend via webhook + callback, and I’m stuck getting the AI response back. Setup: Backend (Replit) → sends POST to Botpress webhook Botpress → processes message (routing + agent works fine) Botpress → sends response back to backend via HTTP request (/callback) Backend → returns stored response to client (Postman) What works: Webhook trigger receives payload correctly (event.payload.body) Routing works (mode switching works) Agent generates correct response in emulator Problem: Backend always receives "no text" HTTP request from Botpress executes, but payload seems empty Tried: event.preview event.output.text turn.KnowledgeAgent.answer None contain the agent response. Question: 👉 What is the correct way to capture the agent-generated response inside a workflow and send it via HTTP to an external backend? Also: 👉 Is using Agent nodes compatible with webhook → backend architectures, or should we use a different approach (e.g. text generation card)?
h
Yes, Agent nodes do work with webhook callback architectures in Botpress. The issue happens because Agent responses are stored in the conversation state, not directly inside event.output.text or event.preview. The correct solution is to capture the Agent response using workflow variables like workflow.agentResponse or turn.last_output, then send that variable inside the HTTP request body to your backend callback endpoint. If needed, I can help adjust the workflow so the callback returns the AI response correctly to your Node.js backend.
f
thank u @helpful-state-22146 i'll try to test it out and back ASAP, and really appreciate your help.
h
ur wel
l
Hello 🙂 Can you drop a screen shot of your workflow please?
w
probably don`t use webhooks
use the "Messaging API" integration instead
much, much better
a
WhatsApp input issue in Botpress (device-specific, fixed by reconnecting integration) Hi team, I’m seeing inconsistent input handling on WhatsApp: * Bot works fine in Emulator and on some devices * On one device, inputs like “1” always go to Invalid selection * Reinstalling WhatsApp does NOT fix it * Reconnecting WhatsApp integration in Botpress temporarily fixes it, then issue returns Validation logic is simple (string match like "1", "2", etc.), so this doesn’t appear to be a logic issue. Question: Could this be a session/webhook/channel state issue in the WhatsApp integration? * Does Botpress cache or maintain session state that can become stale? * Is there a way to inspect raw incoming payloads from WhatsApp? * What’s the recommended production-safe fix (normalization vs buttons)? Need a stable solution before going live. Thanks.
b
@loud-crowd-60573 I've got a problem similar to this one, which I don't see any answer. My published version is not in sync with my development, even if I wait a few minutes after publishing to test it...
Hum... I look at the json export, and see my former SingleChoices option in the trigger (conversation started) node... That's weird. Since I used "Start" instead of the trigger on the emulator and forgot to reconnect it before publishing, those older choices are shown... @loud-crowd-60573 Now it's working, but weird side effect...
l
I'll report this to the team and get back.
2 Views