Processing nested JSON arrays through Zapier webhook integration

I’m working on sending invoice data to QuickBooks Online and need to include multiple line items in each request.

While Zapier supports line items natively, this feature is limited to specific applications. I’m exploring webhook solutions but running into issues with data formatting.

When I structure my data as an array, the system creates separate invoices for each line item instead of one invoice with multiple items.

For nested JSON format like this example:

{
  "invoice_id": "INV-789456",
  "company": "Test Company",
  "creation_date": "12/15/2023",
  "items_list": [
    "Service Fee,1250,0.2000,250.0000",
    "Processing Charge,25,0.0400,1.0000",
    "Monthly Fee,48,0.0750,3.6000"
  ]
}

The webhook treats the entire items_list as plain text rather than parsing individual elements.

What’s the correct approach to structure webhook data so multiple line items are processed within a single invoice request?

change ur items_list to valid JSON objects, not just comma-separated stuff. qb api wants it in a format like `[{

This happens because Zapier flattens nested arrays by default when processing webhook data. I ran into the same issue last year with a QB integration. To fix it, ensure that your webhook sends proper JSON with the right MIME type. Add a ‘Formatter by Zapier’ step between your webhook and QuickBooks. In the formatter, use ‘Utilities’ to convert your items_list array into QB’s format by mapping each element to QB’s line item structure. Alternatively, you can restructure your source to send individual line items as separate webhook calls with a shared invoice ID.

Had the same headache with QuickBooks webhooks. Your items_list structure doesn’t match what QB expects. Skip the comma-delimited strings - you need proper JSON objects with QB’s exact field names.

Try this structure:

{
“invoice_id”: “INV-789456”,
“company”: “Test Company”,
“creation_date”: “12/15/2023”,
“Line”: [
{
“Description”: “Service Fee”,
“Amount”: 250.00,
“DetailType”: “SalesItemLineDetail”
},
{
“Description”: “Processing Charge”,
“Amount”: 1.00,
“DetailType”: “SalesItemLineDetail”
}
]
}

Use “Line” as your array name and stick to QB’s field names. Also check that your webhook Content-Type header is application/json - without it, QB treats everything as text no matter how you structure it.