• 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 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