• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

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