I am trying to merge output of multiple excel files into one list that can then be used by an AI. Aggregate is returning 4 different outputs. as each excel runs at a different time. Merge is returning everything as one huge excel which i do not want. I want a list that has 4 items each corresponding to one excel.
Even my custom code is returning 4 different items.
How do I solve this
Hi there,welcome to the community
i think you can use a code node in here, if the previous time you use a code node it’s returning 4 different items, then you might want to update your code
you can do something like this
const output = [];
for (const item of $input.all()) {
const csvRecord = {
id: item.Id
...otherFields
};
output.push({ json: record });
}
return output;
now with this code, it will return 1 items where that item is an array of your 4 csv
if this solve your problem, give it a like and mark it as solution please
but i think you need to put this after the aggregate node