How can I route based on collection key names in Make?

:bullseye: What is your goal?

I am building a Make scenario that receives a webhook with schools, meal categories, and students.

For each school, I first create or find the correct monthly folder in Google Drive, then I route the school into meal-category branches.

I want one branch for sandwich-related meals and another branch for hot-meal-related meals.

A school may need to go through both branches if both meal categories exist.

The routing decision should be based on the key names inside the meals collection, not on hardcoded exact meal names.

:thinking: What is the problem & what have you tried?

The meals field is a collection/object, not plain text.

Example:
{
“Chicken Sandwich”: 6,
“Bolognese Tray Meal”: 30,
“Zaatar Salad”: 1
}

I need a generic way to check whether any key name inside the collection contains certain keywords.

For the sandwich route, I want to match keys containing:

  • “Sandwich”
  • “Hamburger”

For the hot-meal route, I want to match keys containing:

  • “Tray”
  • “Hot Meal”
  • “Salad”

What I tried:

  • Using Contains directly on the whole meals collection
  • Using Matches pattern
  • Storing meals in a variable and then checking it
  • Trying to convert it to text before the Router

None of these worked reliably, because Make still treats meals as a collection.

I am looking for the correct Make-native way to:

  • inspect collection key names in a filter
  • convert collection keys into searchable text/array
  • or otherwise route based on collection keys in a generic and maintainable way

:clipboard: Error messages or input/output bundles

Relevant example of the meals collection:

{
“Chicken Sandwich”: 6,
“Bolognese Tray Meal”: 30,
“Zaatar Salad”: 1
}

What I need logically:

  • Sandwich route if any key contains “Sandwich” or “Hamburger”
  • Hot-meal route if any key contains “Tray” or “Hot Meal” or “Salad”

The problem is not a clear system error.
The issue is that Router filters do not work correctly when trying to inspect the key names of a collection/object.

:link: Create public scenario page

https://eu2.make.com/public/shared-scenario/4ujfdD4aHUW/רשימות-תלמידים

Hey there,

If the names don’t overlap you can check if the variable exists inside the filter, but you can’t easily check if the variable name contains something.

Can you show some screenshots of possible output bundles and what they look like? Or share the bundles directly.

Hello @Harel_khafi since Make can’t natively inspect collection key names in a filter, the cleanest approach is to use a Tools, Set Variable module before your Router to convert the keys into a single text string using the keys() function, then run your contains checks on that string in the Router filter conditions. That way you’re routing based on readable text rather than trying to parse the collection directly.