Infinite loop inner looping error anyone can HELP!

what i want

:slight_smile: Take guests one by one.

  1. For each guest, generate the 3 message templates (first, follow-up, final).

  2. For each of those 3 messages, wait until the correct scheduled time.

  3. Send it through Twilio.

  4. Move to the next message.

  5. After all 3 are done, move to the next guest.

what is wrong when i connect inner loop ‘done‘ node to the outer loop so inner loop is sending the itself data to the outer loop so that’s way my outer loop 2 item is not sending the actual data that i want instead of actual data it is sending ineerloop data

Each message is sent individually to twilio, when your 3 m3ssages are done, go back to outerloop for next client?

but man after the inner loop finishing which is “loop message“ this node is sendeing the data to the
outer loop so that’s way the actual ‘‘outer loop’’ data is removed and innner loop data is send
what i do ?

any one can help

Please describe exactly what you are trying to achieve.

Take guests one by one.

  1. For each guest, generate the 3 message templates (first, follow-up, final).

  2. For each of those 3 messages, wait until the correct scheduled time.

  3. Send it through Twilio.

  4. Move to the next message.

  5. After all 3 are done, move to the next guest.

what is wrong when i connect inner loop ‘done‘ node to the outer loop so inner loop is sending the itself data to the outer loop so that’s way my outer loop 2 item is not sending the actual data that i want instead of actual data it is sending ineerloop data

Nested loops can be tricky, and you want something like this(one of n8n members solution):

Summari :

In your inner Loop Over Items node, go to Options → Reset → Expression.

Use an expreession like:

{{ $prevNode.name === ‘Your Outer Loop Source Node’ }}.

Ensure the data flow from the inner loop’s “done” output does not overwrite or replace the outer loop’s Dat for the next guest.