**OBJECTIVE**: After my API_Call workflow runs if results -> send workflow.wpPostsText in a message node. If no results -> route to autonomous node. It should never attempt to send an empty message.
ACTUAL: When WP returns no results, workflow.wpPostsText ends up empty. Instead of routing to Autonomous, the flow still attempts to send a Message with empty text and the bot crashes with: Error: data/text must NOT have fewer than 1 characters.
Also in the Router condition editor, I keep seeing a warning and highlighting of my second expression noting: the next expression will not be evaluated because the previous expression will always catch the event.
What I have tried the last two days
- Originally used an AI Transition (Text to categorize: {{event.preview}}, categories wp / answer) it sometimes chose wp even when no results, causing empty Message crash.
- Switched to Router_2 IF/ELSE after API_Call (screenshot attached) to make routing deterministic.
- Tried checking flags like workflow.wpFound and also tried checking for non-empty text (trim().length > 0).
- Still seeing the ānext expression will not be evaluatedā notice in the Router condition editor, and Iām still getting the empty Message crash in some cases.
Ask / What I need help with
- What is the correct/recommended way in Botpress Studio to prevent sending an empty Message?
- Is there a best practice for a āsafe messageā / fallback text in Message nodes?
- Is the Router condition editor warning (ānext expression will not be evaluatedā) normal, or does it indicate the condition isnāt being evaluated correctly?
- Why would the flow still transition to Message after āno resultsā if Router_2 is set up IF/ELSE?
https://cdn.discordapp.com/attachments/1461132662268756190/1461132663783030971/Screenshot_2026-01-14_143810.png?ex=697b3d95&is=6979ec15&hm=25050fa8d9382bd3166b819ecc0b64e8ed5ac106c36c4124a785f500ab40c28a&