Hi Make Community,
I’m currently building a professional automation flow and ran into a blocking issue I can’t seem to solve despite a deep dive into the logic.
Here’s what I’m building:
- We receive a Webhook →
- Make an HTTP request to the Perplexity API to generate a script →
- Set the script into a variable →
- Validate the script: check if the length > 100 characters →
- Route bundles through a Router based on the validation result.
Validation Setup: In the “Set Variable” module, I’m using the following formula to validate:
text
КопіюватиРедагувати
if(length(script) > 100; 1; 0)
This assigns 1 if the script is valid, 0 if it’s too short.
Router Filters:
- First path: isValid = 1 (Valid script)
- Second path: isValid = 0 (Invalid script)
Problem: Even when isValid = 1
as confirmed in the bundle output, the router blocks the bundle and does not continue through the “Valid Script” route.
Things I have already tried:
- Used
toNumber()
to explicitly cast the validation result. - Inspected the bundle with Filter Inspector (shows
isValid = 1
, but still fails). - Checked for possible type mismatch (“1” string vs 1 number).
- Simplified the filter condition to just
isValid = 1
.
Still no luck.
Key Questions:
- Could this be an internal type mismatch issue in how filters parse numeric values?
- Should I handle the validation in a different way to guarantee strict type consistency?
- Are there any best practices when working with 1/0 validation in complex Router scenarios?
- Is there a known bug or hidden behavior related to router filters not matching simple equality conditions?
Any suggestions, tips, or best practices would be highly appreciated!
I want to make this scenario robust and scalable for professional use.
Thank you so much in advance for your help!