Looping Over Binaries - Getting No Output From CSV Files

Hey dear team,
I am stuck with this one, maybe there is a simple solution.

I try loading csv files from an FTP server, and need to validate them. So long it works, that I convert the binary to item, and do some sorting with the code node.
The FTP node simply looks for a *.csv pattern, and successfull gets the files, which are still in binary. At the end, it writes two files back to the FTP, one for the valid records, one for the invalid ones. See first two screenshots.

But: If I have more than one file, in this case two, that are matching the pattern, it gets weird. If simply reading the binaries, only the latest stays, the first seems to get lost or overwritten. Both have the name csv_input.

So I tried a loop to iterate. When listing and loading the csv files, there are 2 items - which is good.
But as soon as the “Extract from file” node is inside the loop, there suddenly is no output anymore, and the workflow stops. No matter where I nest the loop, it always stops after “Extract from file”.
In the end, I tried - like in the screenshot below - to load the files separately.

Version is 1.103.2, SQLite, on local docker instance on Windows 11.


Without loop, it looks like this (should be 10 records from the two test files)


Many thanks for your kind support!

Restructure to process one file at a time
Connect the List Files (FTP) node followed by Get Binary Data.
Use Split Items or Loop Over Items, ensuring each item contains a separate binary.
Inside the loop, first convert the binary into items: for example, with “Extract from File” for each individual item. Then, process the resulting JSON in subsequent nodes.
Ensure the files have unique names (you can pass the actual name as a JSON field to prevent overwriting).

Dear Erick,
Thanks for your quick reply. I tried all the suggestions, unfortunately, I am still stuck.
Please find the workflow right below.

I had to add the Download files option, so that I can access the binary content. Otherwise it did not work for me, when I connected the extract files node directly to list files.

As I understand, this should now loop over each file one by one, and the binary items are now named like the source files.

Unfortunately, it still stops, as there is no output from the binary.

Now that it’s Friday, maybe I just can’t see the forest for the trees.

Can you please attach one such file that doesn’t produce data for us to take a look at, please?

Dear Jabbson, Erick,
It was the most obvious thing… the first of the files was not 100% correct. While manipulating data for testing the JavaScript validation for the date format (yyyy-mm-dd), I deleted one semicolon in the header by chance. No it is running like a charm, and does not even need aggregation and also no looping over the files…

content file 1
ID;Name;Vorname;Land;Registrierungsdatum
1;Mustermann;Max;DE;2025-01-01
2;Meier;Steffi;AT;2025.01-01
3;Huber;Hans;IT;2025-01-01
4;;;;2025-01-01
6;Schmidt;Uwe;DE;2025-01-01

content file 2
ID;Name;Vorname;Land;Registrierungsdatum
10;Mustermann;Max;DE;2025-01-01
20;Meier;Steffi;AT;2025-01-01
30;Huber;Hans;IT;2025-01-01
40;;;;2025-01-01
60;Schmidt;Uwe;DE;2025-01-01

Thanks for solving this!!!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.