https://discord.gg/botpress logo
Execute Code Card doesn't run - Fetch request to B...
# 🤝help
j
Problem: Execute Code Card is not being executed in Send_to_Brevo Node. No console.log outputs visible. The fetch request to Brevo API doesn't run. Objective: Send user data from bot to Brevo API using fetch request in Execute Code Card. Attempted Solutions: - Tried HTTP Request Card (didn't work) - Tried Execute Code with multiple code variations - Verified variable names (email, Vorname, PhoneNumber - all correct) - Console test works perfectly (proves Brevo API is functional) - Code runs in browser console with success - But Execute Code Card in Botpress doesn't execute Integrations: - Botpress Bot - Brevo API (v3/contacts endpoint) Details: The Execute Code Card is not executing. Evidence: - Browser console (F12) shows NO console.log outputs from the Execute Code - Console is empty - no "Success:" message visible - No errors, no output at all - This indicates the code block itself never runs However: - The same fetch code works perfectly when pasted directly in browser console - This proves the Brevo API is functional - The problem is specifically with Botpress Execute Code not executing The node is reached (bot continues), but the code inside doesn't execute. https://cdn.discordapp.com/attachments/1481654532734713999/1481654533238296616/Screenshot_2026-03-12_144518.png?ex=69b419d0&is=69b2c850&hm=e95f24b2d71ef3e156debc96d620a79aa4af79a68c20086e5a42d521c9c5fa91& https://cdn.discordapp.com/attachments/1481654532734713999/1481654534416634037/Screenshot_2026-03-12_145520.png?ex=69b419d0&is=69b2c850&hm=39ec0cc4cc15bd153174bcf0e4ade6e76c58f996280e112d9da3d8585389e36d& https://cdn.discordapp.com/attachments/1481654532734713999/1481654535209619496/Screenshot_2026-03-12_145641.png?ex=69b419d1&is=69b2c851&hm=219d8db48dc2d8f906c8fdaa9a2d27e3044fccfee5a55e4961cf925c12924740& https://cdn.discordapp.com/attachments/1481654532734713999/1481654535624720426/Screenshot_2026-03-12_145700.png?ex=69b419d1&is=69b2c851&hm=45cbd7a7f612dd5c8b9b919b4a2f67d9d18731653295a09015ce86da090ea909&
l
Can i see your variables on the left of your workflow?
🔔 Gentle bump on the Execute Code issue - still looking for insights! Happy to provide more details. Appreciate the help! 🙏
l
Will take a closer look! Can you drop your workspace ID?
j
Of course.
wkspace_01KKGYPR2NX95XZPMM4GBXP407
Have you installed the Brevo integration?
j
Hi Ross, no I haven´t done that yet.
Will try and get back to you.
l
Amazing let me know
j
Hey @loud-crowd-60573 , I just checked – I can only install the Brevo HITL integration, but not the "Brevo Colpress" (or the standard Brevo integration). The problem: I need the normal Brevo integration to automatically save lead data directly in Brevo as contacts (first name, email, phone). HITL doesn't help me – that's only for agent escalation. Do you know why "Brevo Colpress" isn't installable for me? Or is there another solution? Thanks! 🙏 https://cdn.discordapp.com/attachments/1481654532734713999/1483510076047098006/Screenshot_2026-03-17_175025.png?ex=69bad9ec&is=69b9886c&hm=2bb52e96b9529550f7f4b33e4493e90e7a5d169ade4134e6f65d3bcda96899f0&
w
, you’re using the Brevo API directly rather than an extension or plugin. Have you tried adding console.log() statements before and after the fetch call to see what’s happening?
Copy code
ts
console.log("BEGIN-FETCH");

fetch(url, options)
  .then((response) => response.json())
  .then((data) => {
    console.log(data);
  });

console.log("END-FETCH");
j
Hey @white-nest-40686 , thanks for the tip! I tested your debugging approach with console.log() statements in the Execute Code Card. However, the console is still empty – the code doesn't seem to execute at all. The Execute Code Card appears to be skipped or not triggered in the flow. Do you have any ideas why the code isn't running? Or should I check something specific in the Botpress configuration? Thanks! 🙏 https://cdn.discordapp.com/attachments/1481654532734713999/1483873263284129802/image.png?ex=69bc2c2a&is=69badaaa&hm=3c3549e80b14d714f603569eac81d933588f1e28e6b5b2f9ef5937f55654d5f8&
w
Are you testing in the preview page or in the editor? Don't check browser console. You need to check the editor log if you are in the emulator, and the dashboard log if you are testing the published bot.
Please read the documentation at [Botpress Debugger Logs](https://botpress.com/docs/studio/concepts/debugger-logs-json)
The answers are stored in the workflow variables scope, so in your code, you can access them as
workflow.email
instead of
event.state.email
j
Hey @white-nest-40686, thanks so much for the help. Really appreciate it. Thanks for pointing me to the Debugger, Logs & JSON documentation and showing me how to properly check the Botpress logs instead of the browser console. That made everything way clearer and helped me solve the issue! Great support! 🙌
w
Happy to help ☺️
10 Views