I’m trying to calculate the total cost of a stay using Make.com, based on check-in/check-out dates and nightly prices stored in Airtable (which vary by date range). My scenario generates one bundle per night using a Repeater, then queries Airtable for the correct nightly price.
The issue is: I can’t get Make to sum these prices into a single total. Both Array Aggregator and Numeric Aggregator return multiple operations, not one consolidated result. I also tried sum(map(...))
in Set Variable, but that only works if all data is in a single bundle, which it isn’t.
I can’t use JavaScript or external services. I just need to aggregate multiple price-per-night outputs into one sum using native Make modules. Has anyone solved this?
thanks a lot!
blueprint-6.json (22.7 KB)
Hey there,
if an aggregator is returning multiple bundles instead of 1 - then the source module is wrong. Change it to the module that is producing the extra bundles.
After the repeater then the modules give different operations as output. But I need the repeater to get for each dates range a set of all dates within that range. Is there a solution?
Hey @Rural_Escapes - yep, just change the numeric aggregator’s source module to the Repeater module:
The final result will then be one total for all nights.
Also, I’m not sure what your data looks like in Airtable. I see that your Airtable module searches for records where (night_date) is between the start and end date of an accommodation’s record, so I assume you’re setting different prices for rooms for different date ranges.
Are the dates in your database ever overlapping for the same accommodation + same room type?
I.e., is this possible:
Accommodation |
Room Type |
Start Date |
End Date |
Price Per Night |
Accommodation 1 |
Single |
2025-05-01 |
2025-05-31 |
100 |
Accommodation 1 |
Single |
2025-05-01 |
2025-05-10 |
200 |
Accommodation 1 |
Single |
2025-05-15 |
2025-05-28 |
250 |
If this never happens (meaning, you will always have only one price per accommodation + room + date), then you can make a couple of changes:
-
Delete the Array Aggregator between Airtable and Numeric Aggregator (it doesn’t really serve a purpose if you always get only one result from Airtable per night):
-
In your numeric aggregator, change the mapped value directly to Airtable’s Price Per Night
field:
This will give you the same result - sum all nights into one total.
Here’s an example with a few more optimizations to reduce the number of operations this scenario is consuming:
Make community - scenario optimization.json (14.1 KB)
–
Cheers,
Sierra
1 Like
Hi Sierra. Thanks a lot! you solved it. However if I try to set the numeri aggregator with source module air table instead of repeater then I get the same problem of multiple operations.
But connecting source module repeater not I finally got the sum!
thanks
Hey @Rural_Escapes happy to hear that! Yes, sorry - I wasn’t clear on the last part.
You can still:
- Remove the green array aggregator
- In the numeric aggregator, set source to Repeater (not Airtable, correct)
- Set value to Airtable’s
Price Per Night
That should save you some operations.
Cheers!