N8n loop question - how to iterate on key values present in LOOP step in subsequent functions/calls?

See the below n8n flow. My question is linked to the Loop Over Items step: How do I make sure, in subsequent HTTP calls in this case, I leverage the id values provided in the loop call ?

For example, in my code, I am able to loop on items of the LOOP node in the Get Survey Details and Get Survey/surveyCampaign HTTP nodes. The Get Survey/surveyCampaign/surveyContact node however only picks the last loop value (the value assigned to {{ $(‘Get Survey Details’).item.json.data.id }} in the node) instead of picking the same id used in the two previous nodes.

What is the error message (if any)? n\a

Please share your workflow

Share the output returned by the last node

Error since not picking the LOOP id value

Information on your n8n setup

  • **n8n version:1.24.1
  • **Database (default: SQLite):n\a
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • **Operating system:Unix

Actually, I found the method I was using, to get the ID value passed to the first node after the loop, works. The issue was with my HTTP call.

Closing Question.

3 Likes

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