Hi @Small Pond, thanks for joining our Community here!
With the New Spreadsheet Row trigger, the Zap would run every time a new row is added, so you’d potentially end up with each new row creating a new invoice instead of adding it to the same invoice. Is that’s what’s happening here?
If yes, then perhaps you could use a Find Invoice along with a Add Items to Existing Sales Invoice (Xero) action to find the correct invoice and add the additional rows to it. You could use the Paths by Zapier app (Add branching logic to Zaps with paths) to carry out different actions based on whether the invoice was found or not (e.g. create the invoice or add items to it). But paths is only available on Professional plans and higher so depending on what plan you’re on this may not be an ideal solution.
Alternatively, you could achieve this using two separate Zaps:
Zap 1 - creates the invoice
- Trigger: New Spreadsheet Row (Team Drive) runs when a new row is added.
- Action: Find Invoice (Xero) searches for an existing invoice. The Should this step be considered a "success" when nothing is found? option is set to Yes so it won’t halt the Zap if nothing is found.
- Action: Only continue if (Filter by Zapier) the _zap_search_was_found_status field is false (meaning it couldn’t find an existing invoice).
- Action: Create Invoice (Xero) adds a new invoice if one isn’t found.
Zap 2 - updates the existing invoice
- Trigger: New Spreadsheet Row (Team Drive) runs when a new row is added.
- Action: Find Invoice (Xero) searches for an existing invoice. Set to halt the Zap if nothing is found.
- Action: Only continue if (Filter by Zapier) the _zap_search_was_found_status field is true (it found an existing invoice).
- Action: Add Items to Existing Sales Invoice (Xero) adds information from the new row to the existing invoice.
Hope that helps. If you run into any trouble with setting up those paths or separate Zaps, or if I’ve misunderstood the issue here please let us know!