How to parse Webhook response

I’m using the Paperform webhook to get the values of a user submitted form.

The response comes in the following form. I want to use the SplitInBatches node on the “data” array, but am not sure how to specify the data array in the SplitInBatches node.

[
  {
    "headers": {
      ...
    },
    "params": {},
    "query": {},
    "body": {
      "data": [
      ],
      "form_id": "...",
      "slug": "...",
    }
  }
]

You can use a slightly modified version of this:

So with a Function-Node with the following code you can split the array-data into different items which will then work fine with the SplitInBatches-Node:

return items[0].json.body.data.map(item => {
  return {
    json: item
  }
});
1 Like

awesome thanks!