• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

How do I loop thru an array?

drpx

Member
Your Task History ID
IjU3NjYwNTZmMDYzNTA0MzI1MjY1NTUzMzUxMzIi_pc
I'm setting up a workflow scheduled to run everyday at 9AM

It fetches an API that returns who's checking out of a hotel at noon, and returns a list with some data such as name, phone, email

The amount of people varies everyday. I need to send everyone a message before they leave

So, lets say my API returned today:
{user1 name, user1 phone, user1 email},
{user2 name, user2 phone, user2 email},
{user3 name, user3 phone, user3 email}

I want to get every single person's number in that array to send them a message.

I tried to use pabbly iterator but it doesn't really iterate thru the array, it's catching just the first person's data.

I need something such as for loop, to iterate over the whole array

Any tips on how to approach this subject? Thanks
 

Preeti Paryani

Well-known member
Staff member
Hello @drpx

You can try using Iterator by Pabbly to achieve your use case. To learn how to use Iterator please refer to the following tutorial -
.

Please note that when you click the Save and Send Test Request button, only the first object of the array will be displayed in the response. However, during runtime, all steps added after the Iterator will execute for each object in the array, based on the number of objects it contains.
I tried to use pabbly iterator but it doesn't really iterate thru the array, it's catching just the first person's data.
 
Top