QuickBooks Online

Creating an invoice with a variable number of line items

A common use-case is that you might want to create an invoice in QuickBooks Online populated from a list of items in other data sources (for example, from a number of rows in a spreadsheet).

Setting this up requires a few extra steps, namely:

  • Creating the line items for each input using an iterator

  • Unrolling the list of line items from the iterator into the invoice creation

As an example, consider the following spreadsheet containing rows, where each row represents an invoice line item:

Spreadsheet showing invoice line items with columns for Item, Description, Quantity, and Rate to be used in QuickBooks invoice creation

To populate line items from this spreadsheet, we would first retrieve a list of the spreadsheet rows, using a find step:

Relay.app Google Sheets Find step configuration showing selection of rows from the spreadsheet to retrieve invoice line item data

Next, we would use an iterator, along with a quickbooks Create Invoice Line Item step to create a list of line-items:

Relay.app workflow showing an iterator step connected to QuickBooks Create Invoice Line Item action to process multiple rows

Finally, we can "unroll" the list of line-items to populate the line-items in the Create invoice step:

QuickBooks Create invoice step configuration showing line items field populated with unrolled data from the iterator output

Last updated

Was this helpful?