Skip to main content

We are just trying to create a QBO invoice with line items from a HubSpot Deal and its associated line items. I’m super close to having it figured out but just not quite there yet. The way we have it set up currently, it creates a separate QBO invoice for each line item on the HS Deal, and we need it to create one invoice. I know I’m missing some kind of a Formatter step but I can’t figure out which one. 

Here’s the full flow of what I have right now:

My Loop step pulls the list of associated Line Item IDs from the “Find Associations” step:

 

And then it actually separates the line items into their own LineItemID on the output, but then I can only use one LineItemID in the “Find Line Items” step, and I can’t add another Loop to have it go through again, but there’s no other formatter step that I can find that actually separates them out of a comma delimited list and into their own items? 

Here’s my Find Line Item step:

And then I’m using the Line Item Name to search for the corresponding QBO product and append that to the invoice. 

 

I do not know what I’m doing at all and only figured it out this far by copying what other people have posted in forums, so any help is appreciated! 

Hi @campaigncreators 

You would need to aggregate the results from each loop before proceeding after the last loop, which can be done using a Filter step as outlined in the help article: https://zapier.com/apps/looping/help

 

Some options include:

 

Also, Looping iterations runs in parallel.

 

 


Thanks Troy! When I add a filter step before the QB actions, it just proceeds with only one line item on the invoice instead of both. Would I also need to add a Storage or Digest step *before* the filter? See below screenshot for how I have the filter positioned now.

 

 


@campaigncreators 

Info from the Looping help article about how to configure the Filter logic: https://zapier.com/apps/looping/help

 

How do I stop a loop from running in subsequent action steps?

All actions after the looping step will run for each iteration of the loop.
If you don’t want an action step to loop:

  • After the last step you want to loop, add a filter step.
  • Set the filter to only continue if the value loop_iteration_is_last matches the (Boolean) Is True condition.

The filter will run in every loop but will only pass in the last loop.
Any actions step after the filter will run once in the last loop and use only 1 task.

miscEye icon Note

If you want an action step to only run once, add it before the looping step, if possible.
This will use less tasks and the filter step won’t be needed.


Thank you! I’m just trying to figure out where to add a Storage or Digest step?


@campaigncreators 

Aggregating is an advanced approach.

You would have to add logic within the loop (to add each item to aggregate) and after the filter outside the loop (to get the aggregated items).


Maybe I’m confused… I thought your answer was saying that aggregating was the only way to do it. Is there a way to set this up with just the filter step?


@campaigncreators 

General Logic:

  • Anything that needs to happen for each line item should happen WITHIN the Loop.
  • Anything that needs to happen once should happen outside the Looping, either before or after.
    • Using a Filter within Looping to only proceed after the LAST loop iteration is a way to break out of the looping to continue with single action steps that happen once for a Zap Run.
    • Info from the Looping help article about how to configure the Filter logic: https://zapier.com/apps/looping/help

 

Again, Looping and Aggregating are advanced concepts in Zap step designs.

NOTE: Loop iterations run in parallel unless configured to run sequentially.

 

For example, the QBO Find Customer step, should probably be outside the Looping logic because you only need to find the Customer once to then use in the QBO Create Invoice step, so that step should be moved before the Looping OR after the Looping Filter step that handles the Last Loop iteration.

 

If you need help, consider hiring a Certified Zapier Expert: https://zapier.com/experts


Reply