Skip to main content
Answer

Preventing errors when Webhook returns an empty Payload and Looper fails to find a Looping value

  • November 14, 2024
  • 3 replies
  • 40 views

I parse a returned API payload via a webhook and the split it out using a looper function. The problem is that sometimes the payload doesn’t have any data records and so Looper cannot find the number of records to iterate.

It all works so all it brings me is a Zap error, which I could just ignore, but if I wanted to clean it up what would be the best way to do this?

Looking at the error, after making the API call, the total in the returned payload is 0. Might a filter work after the Zapier returned payload step asking it to continue only if the total is greater than 0?

Cheers.

 

 

Best answer by jayeshkumarbhatia

Hey @GSH ,

 

Yes, you are right. You should use Filter by Zapier and that will solve your problem. 

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

jayeshkumarbhatia
Forum|alt.badge.img+7
  • Zapier Solution Partner
  • Answer
  • November 14, 2024

Hey @GSH ,

 

Yes, you are right. You should use Filter by Zapier and that will solve your problem. 


  • Author
  • Beginner
  • November 14, 2024

Thanks, I tested this out and it worked just fine.


ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • November 15, 2024

That’s awesome ​@GSH! A huge thank you to ​@jayeshkumarbhatia for lending a hand here!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help!