Mastering Aggregating API Calls: A Guide for Make.com Users
Have you ever found yourself in a situation where you need to make an HTTP call to retrieve an array of different IDs, and then make a second API call with each ID to get more data? And then, you want to aggregate all the data from each of these 'per ID' calls and evaluate it all together? If so, you're not alone. This is a common challenge that many Make.com users face. But don't worry, we've got a solution for you.
Step-by-Step Solution
First, you make an HTTP call to retrieve an array of different IDs. These IDs are returned as an array of unknown size within one bundle under Data.events. You then use an iterator to iterate over this array and make a second API call with each ID to get more data per ID.
Now, here's where the problem arises. You want to aggregate all the data from each of these 'per ID' calls and evaluate it all together. But each HTTP call is classed as an individual operation and the scenario continues each time a call is made. So, how do you aggregate all the responses before proceeding?
The solution is simple. In the array aggregator, set the source module to Iterator. This way, you can use the output from Iterator as part of the Aggregator and then do the groupby that you are currently doing.
Troubleshooting Tips
If you're still having trouble, make sure that you've set the source module to Iterator correctly. Also, check that you're using the output from Iterator as part of the Aggregator and doing the groupby correctly.
Conclusion
In conclusion, aggregating data from multiple API calls can be a challenge, but with the right approach, it's definitely achievable. Remember to set the source module to Iterator in the array aggregator and use the output from Iterator as part of the Aggregator. Happy coding!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.