Quickbooks 'Create an Invoice' adding a blank line item for subtotal

Good afternoon!

I am trying to pass customer purchase details from Retool to a scenario via a webhook, and then create a Quickbooks invoice using that data.

I started with this Create a Quickbooks invoice template and modified the trigger.

The iterator and array aggregator appear to be working properly, but the Create an Invoice module is adding an extra line item to the invoice.

It appears to be adding a subtotal line item with no data in it. I don’t know why this is happening, as the input bundle clearly has the correct line items, but the output bundle simply doesn’t match.

I’ve tried numerous things, including adding an Update an Invoice module and sending the same array to the Lines input, switching to Make an API call (couldn’t get this to work at all), creating and parsing JSONs, etc.

I also considered trying to remove a line item, but that’s a bandaid and not foolproof, as adding this blank line item is not guaranteed.

Any ideas? Thanks!

The scenario:

The output of the array aggregator:

Here is a screenshot of the Create an Invoice input:

Here is a screenshot of the output:

Configuration of Create an Invoice module:

How this shows up in QB: