Question

How to run a Sub-Zap only once after trigger "New or Updated Spreadsheet Row in Google Sheets"?

  • 5 August 2023
  • 2 replies
  • 105 views

I have a zap which does the following:

  1. (Trigger: New or Updated Spreadsheet Row in Google Sheets): I manually copy and paste many rows into a specific Google worksheet. Each row represents an inventory product.
  2. A Sub-Zap is called which looks to Sheets to find an existing Oauth token to check whether it is expired. If it is expired, it generates a new Oauth token. If it is not expired, the Sub-Zap ends.

  3. Goes through 3 separate zaps to add the product to ebay (ebay API requires three separate calls to create a product).

The problem is that the Sub Zap runs once for each new row added. The Sub-Zap has several steps, so this adds multiple Tasks for each row (product) added. However, I really only need to run this Sub-Zap one time; to either grab the existing unexpired Oauth token from Google Sheets, or to generate a new Oauth token if it is expired. How can I run the Sub-Zap only once and then pass the Oauth token to the rest of my zap for each row (product) added? Rather than run it once for each row. 


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

2 replies

Userlevel 7
Badge +14

Hi @Gtron 

Good question.

Perhaps try using Paths in the Zaps: https://help.zapier.com/hc/en-us/articles/8496288555917

Paths require a Zapier Pro+ plan.

The problem is that I want to use the trigger "New or Updated Spreadsheet Row in Google Sheets". However, this starts a loop for each new row I added (and I usually add 50+ rows at a time). So long as the Oauth check occurs after this trigger, it will also be looped and iterate for each row. 


What I ended up doing is creating a separate Webhooks zap, which executes when I click a URL. I added that URL into my worksheet, so I can click that it like a button to execute the Oauth renewal. I will just have to manually do that before adding any new rows which trigger the other zap.