Creating a CSV from an HTTP request

I have a HTTP request that returns some records, I want to create a CSV from those records and send that CSV in an email. The way I have it set up currently it is only adding the first record to the CSV and sending it. What do I need to do differently here?



Welcome to the Make community!

You did not iterate through the array. You cannot aggregate an array if each item of the array is not read individually.

“Looping” Through Array Items

When you see an ARRAY, think ITERATOR module.

Then,

Combining Bundles Using Aggregators

Every result (item/record) from trigger/iterator/list/search/match modules will output a bundle. This can result in multiple bundles, which then trigger multiple operations in future modules (one operation per bundle). To “combine” multiple bundles into a single variable, you’ll need to use an aggregator of some sort.

Aggregators are modules that accumulate multiple bundles into one single bundle. An example of a commonly-used aggregator module is the Array aggregator module. The next popular aggregator is the Text Aggregator which is very flexible and can apply to many use-cases like building of JSON, CSV, HTML.

You can find out more about the other types of aggregator modules here:

Example

Here is an example of how your scenario could look:
Screenshot_2025-04-10_100442

This is just an example. Your final solution may or may not look like this depending on your requirements and actual input data.

Hope this helps! Let me know if there are any further questions or issues.

— @samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

3 Likes

Thanks for responding. I knew about iterators but didn’t know how they worked with aggregators. That worked for me.

2 Likes