Building a Lead Quality Automation

:bullseye: What is your goal?

The Goal: In the next step, I am using a “Set Multiple Variables” module to calculate the Average Score for each source bundle.

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

Context: I am building a Lead Quality Analysis workflow. I have a list of students in Google Sheets with a TestScore (F) column. I am using an Array Aggregator to group these leads by their Source (e.g., Facebook Ads, Website).

The Aggregator is working correctly and producing 3 bundles, each containing an array of collections. Each collection inside the array has a key named TestScore (F).

The Goal: In the next step, I am using a “Set Multiple Variables” module to calculate the Average Score for each source bundle.

The Problem: My length() function works perfectly, but my average(map()) formula is returning empty even though the input array clearly contains data.

My Formula: average(map(48.Array; TestScore (F)))

:clipboard: Error messages or input/output bundles

The Issue: The map() function doesn’t seem to be “picking up” the values from the TestScore (F) key, so the average() function has no numbers to calculate.

:link: Create public scenario page

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

1 Like

Hey there,

average() accepts a list of values where map() returns a primitive array.

Option one is to put the map() function in an iterator and follow it with a sum aggregator, then have that give you the average.

Option two is to put the map() function inside a sum() function and divide that by a length() function that has the same map() function inside it. You might need to add parseNumber() to those so it works. Something like:

{{sum(map(48.array; "Test Score (F)")) / length(map(48.array; "Test Score (F)"))}}

Honestly, building a lead quality workflow inside Make completely changed how I handle inbound traffic. Instead of manually checking forms, I score fields, validate emails, enrich data, and auto-tag suspicious submissions. A simple router plus a few filters already cuts junk in half. If you’re stuck, start small and layer logic step by step instead of overcomplicating i