• 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 to Loop Through Multiple Fields and Return a Specific Field Based on its Content?

avielchik

Member
Hi everyone,

I'm working on a Pabbly Connect workflow where I receive multiple fields from a previous module (in my case, an Email Parser, but this could be from any module). These fields often have similar names, like "attachment_1", "attachment_2", "attachment_3", and so on.

I need to find a way to loop through or inspect all of these fields and identify the specific field that contains a certain keyword or pattern (e.g., the word "Attachment" and ".pdf"). Once I find the field that matches my criteria, I want to extract its value (which in my case will be a URL) and use it in a later step.

I know that other automation platforms have an "Array Aggregator" or similar functionality, but I can't seem to find an equivalent in Pabbly Connect.

My question is: What's the best way to loop through multiple fields in Pabbly and return the value of a field based on the text it contains?

Thanks in advance for your help!
 

ArshilAhmad

Moderator
Staff member
Hi @avielchik,

Please try using an Iterator along with the Filter step to achieve this use case. The Iterator will loop through all the values received in the trigger step, and the Filter will ensure that the next step is executed only if a specific value passes through the Iterator.



Make sure to disable the 'Simple Response' before capturing the data in whichever module you are looking to iterate the data of. This will give you the response in the form of a JSON that can be recognized by the Iterator.
1736290273215.png
 
Top