• 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

ForEach loop type of workflow

mdb

Member
Hi,

I'm trying to do a foreach loop kind of workflow, but I'm having the damnest time trying to get it to work.

example: I have a big block of text of 3000 words, and I use text formatter to split the text into multiple segments based off # of characters
Segment Index = All (simple response shows me it split into 5) (simple off shows me a JSON output)

From here is where I want my foreach loop to run: i.e. : foreach ($index in $segmentIndex), do {operation x y z}

But I'm having the hardest time finding an action step that knows how to iterate this correctly.

The iterator app only shows me the first result, not the other 4..
The array function only allows me to choose a specific index (tried doing 0, 1, 2 as index and it gives an error)
the data transformer / line itimizer shows a null response on the JSON from the text formatter

Any help would greatly be appreciated!

Thanks,
MDB


P.S. it's the "T to G" workflow
 
Last edited:

Supreme

Well-known member
Staff member
Hey @mdb

Please allow us sometime to check the possibility on your concern. Also, do share the name of the workflow once in which you have tried the same.
 

Supreme

Well-known member
Staff member
Hey @mdb

The iterator app only shows me the first result, not the other 4..
While setting up the workflow, the Iterator action step only shows one iteration in the response and in real time execution the Iterator will process all your responses once by one.

So, kindly give your workflow a try in real time and let us know if that is working accordingly.

 

mdb

Member
@Supreme
I had tried that as well to a test in google sheets to see if it works correctly (ultimately not where it needs to go)
But I get the following error when testing to google sheets:

1665396868071.png


Tried with quotes and without.
 

Supreme

Well-known member
Staff member
@Supreme
I had tried that as well to a test in google sheets to see if it works correctly (ultimately not where it needs to go)
But I get the following error when testing to google sheets:

View attachment 16751

Tried with quotes and without.
If you are passing only one field's data to your Google Sheets then, you can try "Google Sheets: Add New Row" action step.

Since the content which you are passing is actually contains multiple double quotes which is why it is interfering with the JSON in which the data gets sent to Google Sheets.

2022-10-10_17h36_34.png
 
  • Like
Reactions: mdb

mdb

Member
I was afraid of that, I ended up (sort of) making a manual iterator by using if/then (filter) and then counting and matching the number of items.
 
Top