Loop inside loop is not working as intended - only passing once

Hi. I’m by no means an expert, I started playing with n8n just a few days ago, I built this from scratch.
What is this doing? Taking text in other language, extracting data, translating it etc.
Since the original website has no RSS or any other feed, I’m using my python script to parse news that I want to translate and put into my test website (to be precise - to get links to these entries). These entires are being saved in csv.

The problem appears when the main loop starts - first run is going as intended, but on the second round, the second loop is doing nothing (it is supposed to get a list of images to upload to my ftp).

Everything else seems to be working fine except that second loop.

I tried “reset” option, but it makes it to loop into infinity.

Maybe I’m doing something wrong. Endpoints of main loop are connected to nodes with Wordpress operations, the second loop is ending in other place.
Everything works if remove the main loop and pass only one link, but that’s obviously not a solution.
I’m trying to understand n8n, so I hope someone will help me. Thanks.

1 Like

Hi @Hououin

Can you upload your workflow into a code block here? Also, it may help to isolate and simplify your issue in a smaller workflow so we can help solve the issue.

Here’s a gif on how to upload your workflow.

pasteworkflow

Hi, thanks for your answer, but I found that no matter what I do, it won’t work.
The only real answer for this problem is to use sub-workflows. When variables are passed to sub-workflow it works like charm.
So for any future readers of this thread - just learn how to make a sub-workflow. It will solve this problem.

1 Like

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