Describe the problem/error/question
When running nested loops, the order of operations doesn’t seem to work as expected. I’m sure it’s just me not understanding the underlying functionality of the looping mechanism so I’d love some help.
Here’s what I’m trying to do:
- Fetch all campaigns from airtable
- For each campaign, find the associated ad groups from another table
- For each ad group, fetch all of the associated ads
At each step I want to put that current info to a Google Doc so that I can form a simple text doc like this:
Campaign A
Ad Group A
Ad A
Ad B
Ad Group B
Ad A
Ad B
Campaign B
etc
Please share your workflow
Output
Although the workflow runs without error, the order is all messed up. It’s pushing all of the campaigns first then pushing in all of the ad groups, then finally the ads. Instead of correctly nesting them
Information on your n8n setup
- n8n version: 1.41.1
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): docker
- Operating system: