Documentation is being updated. Some sections may not reflect the latest features.
Looking for step-by-step guides? Explore Tutorials →

For Loop Node

Iterate over arrays and collections.

Overview

The For Loop node allows you to iterate over arrays and process each item. Results can be collected into a new array for use in subsequent nodes.

Configuration

Field Description Required
Input Data The array to iterate over (use variable syntax) Yes
Iteration Variable Variable name for the current item in each iteration Yes
Collector Variable Variable name to collect results from all iterations No

Example

Input Data: {{users}}
Iteration Variable: current_user
Collector Variable: processed_users

Inside the loop, access the current item with {{current_user}}

How It Works

  1. The loop receives an array from Input Data
  2. For each item, it sets the Iteration Variable to the current item
  3. Nodes inside the loop can access {{iteration_variable}}
  4. Results are collected into Collector Variable (if specified)

Using Variables

Click the Insert Variable button to insert available variables from previous nodes:

{{api_response.items}}
{{scraped_data.links}}
{{datasource_results}}

Nested Properties

Access nested properties in your iteration variable:

{{current_user.name}}
{{current_user.email}}
{{current_user.profile.avatar}}

Best Practices

  • Use descriptive iteration variable names (current_order not item)
  • Set a collector variable if you need to aggregate results
  • Be mindful of rate limits when making API calls inside loops
AI AssistantPowered by Ubex
Beta
Ask me anything about Ubex workflows, nodes, or the API.