Zapier - How can I sequentially execute an Action for each item in a list?

I’m setting up a Zap that follows these steps:

  1. Retrieve a collection of email addresses from an API endpoint.
  2. Add each email to Mailchimp.

However, I encounter an error when trying to add multiple emails at once, as Mailchimp appears to reject batch subscriptions. The error message I receive is:

Oops. We encountered a problem while creating a subscriber. :frowning: Error: Invalid Resource - Please provide a valid email address.

This issue arises due to Mailchimp’s restriction on multiple subscriptions being processed simultaneously.

My question is, is there a method to execute an action for each individual item in the list?

For example, something like this:

emailCollection.forEach(function(singleEmail) {
  executeSubscription(singleEmail);
});

Keep in mind that I’m unable to use the command line interface. Can this be achieved using a funnel action in Zapier or possibly through scripting?

Thank you!

A practical approach to address this issue while working within Zapier’s constraints is to use a ‘Looping by Zapier’ action. This allows you to create a loop for each email address retrieved from your API. You can set up a loop that processes one single email at a time. For the Mailchimp step, make sure you configure it to only process data from the loop iteration. Next, you may need a filter to ensure only emails are processed, just to handle the error you mentioned. Although it might take additional Zaps at your disposal, this automated method can keep you within Zapier’s visual interface without needing command-line intervention.