Hey guys,
I am trying to create a report with some items from my SIEM with N8N. As they are multiple consoles, I created a node code where there is some information from where it will seek information, such as: URL, customer name, sector. The problem is that, after searching the first customer, he does not perform the search for the rest of the list. Is there any way to perform the entire works of the whole works for each customer on the list?
Im tryng to paste workflow but, returning 403.
In code, im created a variables with informations for customers:
Try removing HTML code from your nodes.
Where do you generate the list?
Edit:
I see. Can you show your return function?
It should return an array iirc.
Instead it return an object that has an array some levels deeper…
// Inicializa a lista de clientes (se nĂŁo existir)
for (const item of $input.all()) {
// array de clientes
if (!item.json.clientes) {
item.json.clientes = [];
}
//XYZ
item.json.clientes.push({
"nome": "XYZ",
"token": "fb6976ba-6709-47a5-be4c-73d8c9e05f69",
"url": "https://10.15.1.115/api",
"sector": "Tecnology"
})
//ABCD
item.json.clientes.push({
"nome": "ABCD",
"token": "7e01616b-2b00-433c-a24d-c20aa1fba42b",
"url": "https://172.254.167.1/api",
"sector": "Health"
});
// FGHJ
//item.json.clientes.push({
//"nome": "FGHJ",
//"token": "b0dbaef8-1ac6-4e65-ac83-fd11a86b243d",
//"url": "https://172.254.118.2/api"
//});
// QWERTY
//item.json.clientes.push({
//"nome": "QWERTY",
//"token": "5720e527-bfb9-4658-8f66-aadda9c6bf59",
//"url": "https://172.254.105.1/api"
//});
}
return $input.all();
I understand the problem.
My requests in HTTP Request are being combined into one.
Instead of executing them for client A and client B and generating separate results, they are being unified in the HTTP Request node.
1 Like
did you resolve the issue?
do you mean the code node? it’s set to “run once for all items”, there’s another option that handles inputs individually. (you might have to change your code afterwards)