Stuck in the if node, unable to generate correct workflow

Hello,
I’m stuck here. In the screenshot or workflow, I used an “If” node where I set an expression like:

{{ $(‘Extract Agent Info’).item.json.foundCards.length }}

This checks if the length is greater than 0. If true, it goes to the field expression, where it paginates until no profiles are left. However, the false and true conditions were set to split out, but this didn’t work as expected. It kept running even when there were no profiles left, continuously generating pages. You can refer to the screenshot; the maximum pages were about 8-9 for 2 URLs, but it kept running and only provided 3 profile listings.

@jabbson Can you please help me in here?

What do you do with ‘true’ wire that connect to ‘Split Out’ Node?:slight_smile:

Try to remove that wire, and it will run properly. I’ve tried that btw.

Also, if it helps, kindly mark my message as solution:)
Thanks!

@cutecatcode The true wire that connects with the split-out sends a bunch of URLs (10 URLs in this case) to separate them individually. Then, it goes to the code for cleaning and appends it to the sheet.

Before that, I tried to connect the true wire with the edit field and the false wire with the split-out, but the split-out only received the false branch, which usually stops the current main URL and the data was in the edit field.

This is the updated one @jabbson

There you go. The only thing that’s left is to write it back to the sheet (and change the code node in the beginning to the google sheet node again, I used code for simplicity).

2 Likes

Perfect, Thank you so much @jabbson :folded_hands:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.