Skip to main content
Best answer

Updating rows in Google Sheets with muliple items

  • March 14, 2021
  • 3 replies
  • 276 views

I have data coming from shopify with Line Items being saved into a Google Sheet.  When an order is updated, new data comes in via a zap.

I have to ensure all old line items (that aren’t in the order anymore) are deleted, update any changes to line items and add any new line items.

I decided the best way was to update the existing rows to mark items as updated, and then just add all the new items again.

However I have to look through the google sheets once, and then once that has finished, the Shopify items once.  How do I do this without running a loop inside a loop?

 

 

Best answer by Troy Tessalone

Hi @Mantzikert 

If you are using the Looping action, there is a data point returned that indicates if it was the last iterated item, that can be used in a following Filter step as described below.

 

Help article: https://zapier.com/help/doc/loop-your-zap-actions

 

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

All actions after the looping step will run. 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.

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • Answer
  • March 14, 2021

Hi @Mantzikert 

If you are using the Looping action, there is a data point returned that indicates if it was the last iterated item, that can be used in a following Filter step as described below.

 

Help article: https://zapier.com/help/doc/loop-your-zap-actions

 

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

All actions after the looping step will run. 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.


  • Author
  • March 15, 2021

Thanks for that.  Obvious now that you point it out.


  • Author
  • March 18, 2021

Hi @Troy Tessalone 

I’ve finally tried to turn on the zap and got the following error.

“Cannot unpause Zap with more than one Looping by Zapier step.”

Have I missed something else that is obvious?

Thanks

Derek