Search code examples
zapier

Loop through Zapier webhook result


Just trying to figure out if it is possible to loop through Zapier webhook result set and do something with it.

I have a zap that runs once a day and makes a GET request to a specific URL. There's a JSON result that comes back and now I would like to loop through this resultset and fetch emails from each record for using this email list when sending emails with Mailgun.

Any hints?


Solution

  • Yes, that's possible! Zapier can loop through actions up to 25 times. You just need to give it data in the right format (an array of JSON objects).

    Here's the steps you'd have in your zap:

    1. Scheduler trigger to run the zap each day
    2. Your webhook GET request
    3. Code step which takes your webhook result, and converts it into an array of JSON objects with email addresses in them
    4. Do something for each email address. You can pick any zapier action, and it will run for every address.
    5. Add any more actions that you want for every email address here...