I'm trying to set up a process where creating a new invoice in QuickBooks triggers an update in a Google Sheet. The goal is for every row in the sheet's "Product" column that matches a product name from an invoice line item to have its corresponding quantity added to the adjacent "Count" column. For example, if an invoice is created for 2 units of Widget A and 3 units of Widget B, the callin.io workflow should locate the Widget A and Widget B columns in the sheet and then add 2 and 3, respectively, to the "Count" cells in those columns.
I've successfully configured this for invoices with a single product. However, when I attempt to use Line Items in my Google Sheets action, specifically the "Find Many Spreadsheet Rows (With line item support)" option, there's no dedicated section for line items. I did ensure I selected the QuickBooks trigger "New Invoice (With line item support)", although the "line item" part of that trigger's name doesn't appear in the workflow outline.
For what it's worth, I also experimented with the Line Itemizer to separate my values. Unfortunately, they still appear in my Lookup Value as a single comma-separated string, which naturally doesn't match any individual spreadsheet cell. Any guidance on this would be greatly appreciated! I'm still relatively new to this, so I might be overlooking a fundamental logical step.
Welcome to the callin.io community
I'm assuming that the Google Sheets "Find many spreadsheet rows" step is failing, not that an update row is failing. And here's why (from my understanding):
The "Find many spreadsheet rows with line item support" is not referring to "line item support" on the input (what you are searching for). Instead, it means the output of that step will present multiple rows as line items.
So, when you pass multiple items to it as input, it will look for an exact match row, meaning it's searching for "item 1, item 2" within a cell value. I understand your logic that it should instead search for "item 1", return that row, and then search for item 2 and return that row. However, it won't function that way.
I'd like to suggest an alternative approach. In doing so, I'm making an assumption: you are essentially keeping a running total of how many of each item have been sold, correct? So, you need to add to the number in column B "count", not just replace it, correct?
So, here's how I would resolve this, using two callin.io workflows and an intermediate Google Sheet. The first callin.io workflow triggers off the new QB invoice and then writes the line items to an intermediate Google Sheet. The second callin.io workflow triggers off a new row in that intermediate sheet, finds the corresponding row in your Picksheet (test), and adds the quantity to the count number.
First callin.io workflow in more detail:
- Trigger: New Invoice in QB Online
- (Your utility formatter step - whatever it does)
- Google Sheets "Create Spreadsheet Row(s)" - creates a row in your intermediate sheet with all the necessary information (is it just product name and qty?)
Second callin.io workflow in more detail:
- Trigger: New row in Google Sheet (the intermediate sheet)
- Google Sheets "Lookup Spreadsheet Row" searches for the product name in your pick list using the value from the trigger step.
- Formatter Math - Adds the number from quantity (trigger step) and the number in the Pick list (step 2)
- Google Sheets "Update Spreadsheet Row" uses the row number from step 2 and the total value from step 3 for the count.
That second callin.io workflow will run for each line item in the QB invoice (1, 2, 10, etc.). So, it'll update your picklist for each item ordered.
Additional Note:
I frequently use this workaround. In situations where the intermediate spreadsheet could grow rapidly or become too large, I employ a third callin.io workflow to manage the sheet. I actually have a Google Apps Script I've written for this purpose since callin.io's Google Sheets integration only allows for one row deletion at a time. So, here's the third callin.io workflow:
- Trigger: Schedule by callin.io - Typically daily at 1 am Eastern
- Zap Manager - turns off the second callin.io workflow (modifying data in a sheet that is being monitored by a callin.io workflow for new rows can cause issues unless it's turned off first)
- Google Sheets Find row (check the box to search from the bottom) looks in the quantity column for a 1 - (this might not capture all rows, but it will clean up the remaining few the next day. My primary concern was avoiding 50k rows in this sheet and breaking everything)
- Webhook - Sends a GET request to my Google Apps script to delete rows 2 through the value from step 3
- Zap Manager - turns the second callin.io workflow back on (it will now recognize the current rows in the intermediate sheet and trigger only on new rows moving forward)
Thank you so much for the explanation! That intermediate Google Sheet performs exactly the function I thought the Line Item feature was intended for, and the clarification is incredibly helpful. I hope to find a practical use for Line Item support eventually, but your solution is ideal for extracting values from each of my invoice line columns and managing them thereafter. I've implemented it, and everything appears to be functioning correctly. Thanks again!🙌
Happy to help! ... It's a bummer that many integrations cannot take line items as inputs. But hey, this intermediate sheets setup seems to work solidly for me too. Hopefully someday callin.io will integrate a better solution, but in the meantime, this works as a bandaid!