How to merge variables from multiple Router branches into one route?

Hi all :waving_hand:

I have a scenario that splits with a Router into three parallel branches.
In each branch I calculate a count (using Array aggregator) and then store it with Tools → Set variable (e.g., hot_count, veg_count, sandwich_count).

I added a fourth branch after the Router to compile a final summary message, but that branch doesn’t “see” the variables that were set in the other branches. In Tools → Get multiple variables, the mapper only shows variables created within the same branch. I need a reliable way to fan-in those three counts and use them together downstream (WhatsApp message + writing to Google Sheets).

Questions:

  1. Is there a built-in/best-practice way to combine outputs from multiple branches back into one route?

  2. Should I use Set/Get multiple variables for this (and if so, how do I reference variables set in other branches so they’re available in the final branch)?

  3. Or is the recommended approach to use Data store (write counts in each branch, then read them in the final branch), or another pattern entirely (e.g., sub-scenario/webhook aggregator)?

Constraints:

  • The counts are simple numbers. I just need them all in one place at the end of the split.

Any concrete examples, screenshots, or blueprints showing the correct pattern to merge variables from multiple routes would be super helpful. Thanks! :folded_hands:

Hi,
It looks really strange, because I built a test scenario and definitely have an access to the variables , at least in runtime.


Hey there,

what is the name of the variables? And which one is the Get module retrieving?

If you only need counts, you likely don’t even need the router, as a single Set Multiple Variables module can let you use the length and map functions on the initial array.

If you need the data in the three separate arrays, you can also filter the initial array of all items individually (2 operations per list).

Hope this helps! If you are still having trouble, please provide more details.

@samliew