Loop Control?

How does the loop node work? I can’t seem to get the functionality I am looking for.

I basically want the second set of nodes (The ones in the loop) to run on a loop and only take one item in as input at the beginning of the loop. This is because I want to run the 3 processes separately then join them back together and send an email for each one of the original inputs.

This is especially troublesome when testing. It seems to be outputing something close to what I want when it runs the full thing, but apify and AI tokens are expensive and the flow takes 20+ minutes to run so I can’t test and develop by running the entire flow.

But when I only run some nodes then the whole # of inputs gets screwy and it starts grouping inputs together, then wasting tons of credits.

Is my approach not suited well for n8n? Is there a better configuration for the output I am trying to accomplish?

I really just need an email sent for each job that is found. That email contains two AI messages from different prompts, and a csv of contacts at that company. This should happen for each company found.

My workflow

Hello @Porter_Gardiner,

Have you tried to use the Split In Batches node with a batch size of 1?

This should ensured each loop takes one input item and runs through the downstream nodes individually.

Hi Gallo,

Would I replace the loop node with the split in batches node?

Try to place after the loop node