HTTP Body Request

Hi all,

upload and transform from file is a breeze, but when I need to make the request, inside the body I want to set an array of objects, one for each row that was in the feed node. How to do because in the browser console I see a single body with a POST for each row, instead I want all the objects in a single array in the body.

Example :

[{ “kpiCode”: “907_3a_1_01”, “value”: “5466”, “kpiWorkflowOptionOverride”: true, “kpiWorkflowStatus”: 5, “kpiWorkflowNote”: “Value set via REST API ID process #357e2911-3149-4dc6-a125-b75666baa19e” }]

but my desiderata is

[{ “kpiCode”: “907_3a_1_03”, “value”: “354”, “kpiWorkflowOptionOverride”: true, “kpiWorkflowStatus”: 5, “kpiWorkflowNote”: “Value set via REST API ID process #357e2911-3149-4dc6-a125-b75666baa19e” },
{ “kpiCode”: “907_3a_1_01”, “value”: “5466”, “kpiWorkflowOptionOverride”: true, “kpiWorkflowStatus”: 5, “kpiWorkflowNote”: “Value set via REST API ID process #357e2911-3149-4dc6-a125-b75666baa19e” }]…

Thanks
R

n8n version: 1.3.82
Database: sqlite
EXECUTION_PROCESS: Main
Running via: n8n cloud
OS: SaaS

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

@Roberto_Zilli , you would need to aggregate your data first or utilize the reference to the node that holds your array, something like below

Pick which suits your use case most.

2 Likes

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