How to get the loop position/index in the Iterator module?

Status: Open · Asked by Raulchong on · 0 views

rfchong — Question ·

Hello Pabbly Support Team,

I am using the Iterator module to process an array of data from Google Sheets.

Inside the loop, I need to send a message to each person telling them their new position in the queue (e.g., "You are now position 1", "You are now position 2", etc.).

However, inside the Iterator step, I cannot find a variable for the current loop's position number, like 'Current Index' or 'Iteration Count'.

My question is: Does the Iterator provide a variable for the current loop position number (1, 2, 3...)? If so, what is its exact name and how can I find it?

Thank you.

Preeti Paryani — Reply ·

Hello @rfchong,

Currently, the Iterator module in Pabbly Connect does not provide a built-in variable for the current loop position number (such as "Current Index" or "Iteration Count").

As a workaround, you can add a Counter step immediately after the Iterator. You’ll find the Counter option under the Number Formatter app.

  • Set the initial value to 0.
  • Increment it by 1 for each iteration.

This way, the first loop run will output 1, the next loop will output 2, and so on—effectively giving you the loop count as the Iterator processes each item.

Back to all forum threads · Log in to reply