For Loop

Overview

The For Loop in autobotAI allows you to automate repetitive actions on multiple items. It is designed to handle both static lists (manually entered values) and dynamic lists (fetched from previous nodes or API responses).

By using the For Loop, you can iterate over data sets and execute tasks for each item—saving time and reducing manual effort.

This guide explains how to configure the For Loop with static and dynamic list values in your autobotAI.

Prerequisites

Before setting up a For Loop, make sure:

  • You have an existing bot workflow or are creating a new one.
  • A node exists if you plan to use dynamic lists.

Steps to Add and Configure a For Loop

Step 1: Add the For Loop Block

  1. Open your bot in the autobotAI Builder.
  2. Click the + button where you want to insert the loop.
  3. Select Loop Start from the block library.

Step 2: Configure Loop Type

In the Loop Start settings panel:

  1. Set Loop Type to List.
  2. Choose between:
    • Static for manually entered items.
    • Dynamic for data from previous nodes.

Step 3: Enter List Items

Static List

Provide a JSON array of values to iterate over.

Example:

json
["item1", "item2", "item3"]

This will loop three times—once for each item.

Dynamic List

Reference previous node results using variables.

Example:
Use $$ to browse and select value from previous nodes.

json
{{$.nodes.start[*]}}

Step 4: Complete the Loop

  1. Add any actions inside the loop.
  2. Click the Loop End and save it as it automatically select previous node results.

Example Videos

Watch how to set up both static and dynamic lists in a For Loop:

  • 🎥 Static List Example



  • 🎥 Dynamic List Example