Filter Failing in Router After Script Validation – Possible Type Mismatch? (Advanced Scenario)

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?

:speech_balloon: 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! :folded_hands:

Welcome to the Make community!

Can you provide more information about your scenario and filters?

You have not yet provided sufficient information to demonstrate the problem that would allow us to reproduce the scenario and any error(s).

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Could you please share screenshots of your full scenario? Also include screenshots of any error messages, module settings (fields), relevant filter settings (conditions), and module output bundles. We need to see what you’re working with to give you the best advice.

You can upload images here using the Upload icon in the text editor:

We would appreciate it if you could upload screenshots here instead of linking to them outside of the forum. This allows us to zoom in on the image when clicked, and prevent tracking cookies from third-party websites.

2. Scenario Blueprint

Please export the scenario blueprint. Providing your scenario blueprint file will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return - this would greatly benefit you in implementing our suggestions as you can simply paste module exports back into your scenario editor!

To export your scenario blueprint, click the three dots at the bottom of the editor then choose ‘Export Blueprint’.

You can upload the file here by clicking on this button:

3. Output Bundles of Modules

Please provide the output bundles of each of the relevant modules by running the scenario (you can also get this without re-running your scenario from the History tab).

Click on the white speech bubbles on the top-right of each module and select “Download input/output bundles”.

A. Upload as a Text File

Save each bundle contents in a plain text editor (without formatting) as a bundle.txt file.

You can upload the file here by clicking on this button:

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario, especially if there are complex data structures (nested arrays and collections) or if external services are involved, and help you with mapping the raw property names from collections.

Sharing these details will make it easier for others to assist you.