astonishing-waitress-91471
01/05/2026, 7:40 PMactions: [
{ action: "postback", label: "Button 1", value: "value1" },
{ action: "postback", label: "Button 2", value: "value2" }
]
// Conditionally add Button 3
if (workflow.CarouselButton3Label === "Vraag prijs aan") {
items[0].actions.push({
action: "postback",
label: workflow.CarouselButton3Label,
value: "button3_value"
})
}
- I put this code inside the {x} field of the carousel card buttons
- When I run the workflow, the bot responds with:
"Cannot display this message"
- Bot logs show:
20:05:18 debug dm dm
Sending Message. Type: carousel. Text: N/A
Sending Message. Type: carousel. Text: N/A
{"scope":"dm"}
My last option is the following: (if possible)
- Use a Transition card with "expression" as the condition type to split the flow into:
- One branch with button 3
- One branch without button 3
Optional to share if helpful:
- Execute Code snippet where workflow.CarouselButton3Label is set (normally not needed because this is configured correctly for my needs)
Thanks in advance!
https://cdn.discordapp.com/attachments/1457821124741169203/1457821125126918253/Schermafbeelding_2026-01-05_om_20.14.30.png?ex=697b0ef9&is=6979bd79&hm=67c0b087dc9dca3655d1494925fc169e605458c3356c4dcec21932ef0569f7f1&wooden-beard-40210
01/05/2026, 8:54 PMgentle-policeman-89141
01/06/2026, 9:58 AMgentle-policeman-89141
01/06/2026, 10:00 AMImage ${i + 1},
subtitle: imageDescriptions[i] || Image ${i + 1}, // use description if exists
imageUrl: url,
actions: workflow.buttons.map(b => ({
action: 'postback',
label: b.label,
value: b.value
}))
}));
await bp.dm.replyToEvent(event, {
type: 'carousel',
items
});`astonishing-waitress-91471
01/07/2026, 2:47 PM