Best answer

Loop through a list of woocommerce line items

  • 30 September 2022
  • 1 reply
  • 238 views

Hi there,

 

I am trying to synchronize my woocommerce stock with a Google Sheet Spread Sheet. In Woocommerce we use the product stock keep unit as ID (SKU) and in Google Spreadsheet we use the same Id.

 

Whenever a SKU is ordered, I want to update the corresponding line in my spreadsheet. So I use the “Find Row” from Google Spreadsheet looking for the SKU. Then in the next Zapier step I want to update the row with a new number.

 

The issue I am running into is that a woocommerce order can have multiple order items. So within the Zap I get a list of SKUs. That would mean that I need to loop through a list of SKUs and repeat the steps related to searching and updating the Google Spreadsheet.

 

I can not figure out how to create a zap that will loop through a list. Any hints (keywords, built in functions, etc) appreciated

 

 

 

icon

Best answer by Danvers 30 September 2022, 15:32

View original

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

1 reply

Userlevel 7
Badge +12

Hi @sunnysimon, welcome to the Community 🤗

There is something that will do this for you: Looping! After you add a Looping action, you can add any other actions that you need (eg search in the Sheet and update it) and the Zap will run through the actions for each line item. You can learn more about looping in this help guide

 

Let us know if that does the trick or if you need help finding another solution 😊