I cannot access the necessary data

When I go through if to check if more than 1 item from the api call returned, I cannot access the necessary data


It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @Kauan , as I understood, your questions is rather about accessing data from Loop node. If so, check out Output of other nodes | n8n Docs.

Note that Loop has 2 outputs. You need to provide the index of the 2nd output ($branchIndex == 1, index is zero-based). Also, using item as a reference to the item might not work bacause of IF node in between. If you are looping with a single item in each iteration, replace item with first() method.

Having said that, using IF node in the loop the way you showed could cause problem as it might break you loop. For the Loop node to work correctly there has to be no loose ends and the same number of items are to be returned back to input of Loop node.

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