How to handle 10–12 products in a single QuickBooks invoice?

Status: Open · Asked by Md mustafa Raja on · 0 views

Md mustafa Raja — Question ·
Hi Pabbly Support,

I am creating an automation using:

QuickBooks Online → Pabbly Connect → Google Sheets

I have one important requirement:

A single QuickBooks invoice can contain 1 product, 5 products, 10 products, or even 12+ products.

I need every product/line item from the same invoice to be added to Google Sheets as a SEPARATE ROW.

For example, if Invoice 2523 contains 3 products:

Row 1 → Invoice 2523 → Product 1
Row 2 → Invoice 2523 → Product 2
Row 3 → Invoice 2523 → Product 3

If another invoice contains 12 products:

Row 1 → Invoice 2524 → Product 1
Row 2 → Invoice 2524 → Product 2
...
Row 12 → Invoice 2524 → Product 12

I also need a unique Item ID for each product, such as:

2524-01
2524-02
2524-03
...
2524-12

The customer name, WhatsApp number, product name, quantity and line-item details should come automatically from QuickBooks. I do not want to enter these manually in Google Sheets.

The main problem is that QuickBooks line items are appearing as separate fields in Pabbly rather than one simple array.

What is the correct Pabbly Connect setup to handle a variable number of line items (10–12 or more) automatically?

Should I use Code by Pabbly, Loop, Iterator, or another method?

Please provide the simplest recommended setup.
Pabbly Support — Reply ·

Hello,

Thanks for reaching out to Pabbly Support!

For splitting a QuickBooks invoice that contains a variable number of line items (1, 5, 10, 12+) into separate Google Sheets rows, the recommended approach in Pabbly Connect is to capture the full line-item array and then use the Iterator to process each item one at a time.

The general pattern is:

1. Trigger: QuickBooks Online (new/updated invoice).
2. Capture the full (advance) response so the complete line-item array is available, rather than a simplified response where items appear as separate fields.
3. Add an Iterator step and point it at the line-item array. The Iterator processes each line item separately.
4. Add a Google Sheets: Add Row action after the Iterator and map the per-item fields (product name, quantity, line-item details) along with the shared invoice-level fields (invoice number, customer name, WhatsApp number). Because this runs once per iterated item, each product is written as its own row.

So the correct tool here is the Iterator (not Code by Pabbly or Loop) for expanding the line items into individual rows.

Thanks & Regards,

Adeel Akhtar
🌐 Pabbly.com

Back to all forum threads · Log in to reply