New to n8n, I feel like I must be missing something. I have a basic array. I need to POST that array, in full. Any way I try, it ends up POSTing every item individually. I just want to take the array generated from the GenData step and set it as the HTTP body. The input fields are draggable, but not the entire input step. I’ve found some references to similar issues, but not quite the same, and the solutions involved writing custom JS… Seem way overkill for something so seemingly simplistic.
What is the error message (if any)?
Please share your workflow
Not sure how to share it without showing sensitive info. Pertinent node:
set the body content type to JSON in the HTTP node, then in the body field use the expression tab and reference {{$node.GenData.json}} directly. thats what sends the whole array as-is instead of iterating through each item. the drag-and-drop from the input panel only maps individual fields, not the parent object
Hi @flowdan According to the principle of data pass down in n8n, each ITEM which in your case might be (10-12) will be treated differently (1 item → 1 run, each item will make the second node run each time) as it says it is an ARRAY of items, what aggregate node will do is that it would combine all the different items into a single item, i dont know the request you are tryna make in HTTP but aggregate node is what we use to aggregate a list of items into a single item without compromising the data.
Ok, that’s the key piece of info there. On other platforms I’m used to just slapping the generated json body in as the input for whatever and we’re off. So there’s just no way to address an entire array as a single item for the purpose of passing the entire thing, it’s gotta be wrapped up into an object. Easy enough.