https://discord.gg/botpress logo
Data from Website in Botpress
# 🤝help
b
All, I am struggling with getting data from my Webflow website into my bot. The website sends the data properly (screenshot 1). First problem: In Botpress, digesting the data worked for a while. Currently the data is not digested at all (screenshot 2). Second problem: How do I get the values from the website into a variable in the Bot? This is the code I am currently using: console.log('=== Extract Context Data ==='); // Die Daten sind in event.payload.payload const outerPayload = event.payload || {}; const innerPayload = outerPayload.payload || {}; console.log('innerPayload:', innerPayload); // Die Keys heißen framework_context und friction_context! const framework = innerPayload.framework_context || innerPayload.framework || null; const friction = innerPayload.friction_context || innerPayload.friction || null; console.log('Extracted:', { framework, friction }); // Speichere workflow.framework = framework; workflow.friction = friction; console.log('✅ Final:', { framework: workflow.framework, friction: workflow.friction }); No clue what I am doing wrong... https://cdn.discordapp.com/attachments/1448693917020065844/1448693917892476948/Bildschirmfoto_2025-12-11_um_16.08.09.png?ex=694176d9&is=69402559&hm=644c24e74cde6c03c69e6b0b26173a9b04f201d3f752e66e1c30e5ff21d2f068& https://cdn.discordapp.com/attachments/1448693917020065844/1448693918391730218/Bildschirmfoto_2025-12-11_um_16.09.15.png?ex=694176d9&is=69402559&hm=ea7d94e1a9dcf0868ffaf0e5ee6988e661d94b02dbd86f25ef477ebcb8666489&
g
Are you using (to send data to the bot) window.botpress.sendEvent ?
when you use window.botpress.sendEvent you send a json object to the bot. what I always do is send a root level "type" field. Then you can store the data in several ways. 1) after incoming hook.
Copy code
if (event?.payload?.payload?.type === 'your-event-type') {
  workflow.yourVariable = (extract data from payload)
}