Merging CSV files - array aggregators or iterators?

:bullseye: What is your goal?

I want to merge two CSV files to create a third one. Before merging, I need to adapt (create CSV) both files.
Normally, my files should have the same number of rows, but in the worst case, I might have different number of rows.

:thinking: What is the problem?

If I parse 2 CSV files, running the sequence will end up in one action on the second file for each bundle of the first file.
Using array aggregators after each CSV>Create CSV modules avoids this effect, but I don’t know how to merge the two arrays into one array. Here, I can have only two tables one over each other (the second table would be added after the last row of the first table) instead of having the second table next to the first one (having a line by line merge of the data).

:test_tube: What have you tried so far?

Put Array Aggregators after each Create CSV.

:camera_with_flash: Screenshots: scenario setup, module configuration, errors


Welcome to the Make community!

If you simply want to append the contents of one after the other, a CSV is basically a huge text file, so you can just map one after the other. I’m guessing this is not what you want?

Screenshot 2025-12-12 165049

I think this question is not possible to answer accurately without knowing how both output CSVs look like, and an example of how you want to “merge” them together.

We’d love to help, however, we require more information that demonstrates the problem to help us reproduce the scenario and any issues and errors.

To allow others to assist you, please provide the following:

1. All Relevant Screenshots

We need to see what you’re working with to give you the best advice. Screenshots are important because Make is a visual editor — a picture provides us with more context.

It would help us identify the issue by having screenshots of:

  • the full scenario, and the zoomed in parts of the scenario that you are referring to (if your scenario is huge),
  • a full scenario run/execution from the history (showing output “speech” bubbles),
  • relevant module fields (showing how you’ve used any built-in functions, and how you’ve mapped the variables),
  • relevant filters between modules (showing which operators and any built-in functions you’ve used, and how you’ve mapped the variables),
  • relevant module input/output bubbles,
  • if applicable, any error messages,
  • and if applicable, any external services (spreadsheet headers/ sample data/ regex101.com/ etc. to show the item/ record exists, and is set up correctly).
Need help❓View instructions ◀

We would appreciate it if you could directly upload screenshots here instead of linking to them outside of this forum. This allows us to zoom in on the image when clicked, and also having improved privacy from third-party sources.

Taking Screenshots

  • Microsoft Windows: Take screenshots using the “Windows Snipping Tool”, by pressing either PrtSc or WinShiftS keys on your keyboard.
  • MacOS: Take screenshots by pressing CommandShift4 keys on your keyboard.

Uploading Attachments

  • Drag image files directly into the rich-text editor, or
  • Click on the upload button in the editor toolbar to select files:

2. Scenario Blueprint

Providing your scenario will allow others to quickly recreate and see how you have set up the mappings in each module, and also allows us take screenshots or provide module exports of any solutions we have for you in return. This would benefit you in implementing our suggestions as you can view screenshots of the changes or paste corrected modules back into your scenario.

Need help❓View instructions ◀

A. Export Blueprint

In the scenario editor, click the three dots at the top-right, then select “Export blueprint”.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    blueprint.json (12.3 KB)

B. Create Public Share Link

In the scenario editor, click on the Share button:

Read more about the scenario sharing feature in the Help Centre.

3. Properly-formatted Output Bundles from a Scenario Run

Please provide the input/output bundles of each of the relevant modules by running the scenario, or get the bundles from a previous run from the Scenario “History” tab.

Providing the bundles from a scenario run will allow others to replicate what is going on, especially if there are complex data structures (nested arrays and collections) and external services. This helps mapping the correct raw variable names from collections (instead of the label/display name).

Need help❓View instructions ◀

Click on the white speech bubbles on the top-right of each module and select “Download output (or input) bundles”.

A. Upload a Text File

Save each bundle contents in a plain text editor as a moduleNumber-output.txt file. Open the file to check if it has not added additional formatting or encoded the plain text.

  • You can upload files and images to this forum by clicking on the upload button:

    Uploading an attachment here will look like this:
    module1-input.txt (1.2 KB)
    module1-output.txt (3.4 KB)

B. Insert a Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the bundles AND format them correctly.

:warning: Formatting IS Important! :warning:

Here are some ways to provide text content in a way that it won’t be modified by the forum.

  • Method 1: Type code fence manually —
    Manually type three backticks ``` in a separate line before and after the content, like this,

    ```
    text goes here
    ```
    
  • Method 2: Highlight the pasted content, then click the preformatted text/code button —

  • Method 3: Upload your file elsewhere and share the public link —
    This method is only advised for large files exceeding the forum upload limit.

Sharing these details will make it easier for others to assist you, so that you can get better answers, faster.

— @samliew
P.S.: investing some effort into the tutorials in the Make Academy will save you lots of time and frustration using Make!

1 Like

Thank you for your reply!

Here is my scenario:

The first two rows of the first CSV file including the headers looks like this after the array aggregator [55]:

“valid”;“Td”;“Ts”;“FF”;“DD”;“N”

“202512120100”;“8.3”;“9.7”;“3.6”;“143”;“8”

The first two rows of the second CSV file including the headers looks like this after the array aggregator [57]:

"T";"WX";"RR";"GLO"
"11.7";"00";"0.0";"3348"

To get the combined CSV in the FTP folder [59], I have the following statement:

This is NOT what I would like to have.

My wish would be to have the combined CSV with the following output:

"valid";"Td";"Ts";"FF";"DD";"N";"T";"WX";"RR";"GLO"
"202512120100";"8.3";"9.7";"3.6";"143";"8";"11.7";"00";"0.0";"3348"

Hi @Boschung, one of your issues here is that the data collections don’t share a common key.

Are you assuming that both files have exactly the same number of rows and each row number in one goes with the data in the same row in the other file?

Either way, the process is going to pretty much be the same with just one slight difference.

Are you able to answer which joining method you’re using and can you provide sample CSV files so we can build this out and share the blueprint with you? Unfortunately we can’t share data structures, but we can share a walkthrough on that.

Essentially, you can convert both CSV files to array objects, iterate through one, then aggregate into one big array consisting of all the fields, using fields in one array to look up fields in the other.

Here’s the general flow:

Start by placing an array aggregator or Create CSV (Advanced) module, create a custom Data Structure for it consisting of all the fields from both files, put this aside. Call it Array Aggregator #3 (or Create CSV).

FTP Get a File #1 → Parse CSV #1 → Array Aggregator #1 → FTP Get a File #2 → Parse CSV #2 → Array Aggregator #2 → Iterator Array #1 → Aggreagtor Array #3 or Create CSV

For each iteration of array #1, you’ll need to place those values in their corresponding fields in array aggreagtor #3 or Create CSV.
For the fields from Array #2, you can use map() to get the value from array #2 and use the Bundle Order Position or another value as the lookup key.

Hope that makes sense and hope it helps!

If these terms don’t make sense to you, please check out Make Academy to get the basics down.

1 Like

Hello and thank you for your answer!

I can share two examples of CSV files used in this scenario:

Test_File_Solar.csv (1.1 KB)

Test_File_Runway.csv (2.1 KB)

Here is also the Blueprint:

Merger_CSV_files_blueprint.json (21.0 KB)

I probably miss something in the Create CSV module, to be able to get the final combined CSV file.

I’m sure that I’m close to the solution, and am really grateful for your help!

I’m still struggling with the map() fonction. In the last CSV>Create CSV module, I have the following fields:

I suppose that the mapping does not work like this.

If I try with this:

, I will have the same value on all rows.

Any idea?

What are you trying to map in there? Cause that formula isn’t going to give you anything useful. You can hover over the formula to see what argument goes in which position.

You’re getting close. You don’t need map(), just get(). You’ll see in the blueprint.

I just set this up and here’s an example of the output

Here’s the scenario Combine CSV by Row Number - Make.com Automation Scenario

You’ll need to rebuild your Data Structure, but what you have may already work.

There are two paths, one to create objects out from the combined data and another that goes straight to combined CSV.

1 Like

Thanks a lot for your support!

1 Like