Skip to main content

I have a Zap, which contains a loop that calls a sub-zap on each iteration. 

 

The sub-zap contains an API call that returns some results along with a ´nextCursorMark´ variable. In order to loop through all my results, I need to make the subsequent API call, updating the CursorMark to that returned by the previous API call; for this, I tried to use storage by Zapier in my parent Zap, setting the variable “cursor” to “*” for my first iteration, and updating it to the returned value from my sub-zap on subsequent iterations.

´Parent` zap

parent zap calls sub-zap using the variable from storage by zapier

On this step, I need to select the variable, which I set to the output of step n4 since I cannot use a further step to set the value...so I guess it´s just setting it to that static value on each iteration

trying to replace the variable for the next iteration with the returned value from the sub-zap

I´m not sure how I can replace the variable for the next iteration, since that value comes from a future step...

cursorMark is an entry in the sub-zap
cursor mark is used to iterate through the results from the API

 

 

sending the next cursor mark to the parent zap (returned from the API call)

 

Since my variable is not being updated but instead, my parent zap is always sending the variable as * to the sub-zap, which, instead of leaving me with all the results, just repeats a series of them.

 

How would you approach this? Is this the correct use of storage by Zapier? Is there an error in another part of the automation?

 

Thanks in advance!

Be the first to reply!

Reply