Hi Community,
I’m building an Iterative Macro for a cursor-based API (Repsly v3):
GET https://api.repsly.com/v3/export/clients/{lastTimeStamp}Pattern:
Macro Input schema (and expected Iterative Output schema):
What works:
Guards applied:
Issue: Despite all this, the second iteration sometimes starts again with the initial input row (lastTimeStamp = 0), as if the macro ignores the Loop output.
Design details:
records_count > 0 AND NOT IsNull(new_last_ts) AND NOT IsNull(lastTimeStamp) AND ToNumber(new_last_ts) > ToNumber(lastTimeStamp) AND NOT IsNull(total_count) AND total_count > 0
Questions:
Solved! Go to Solution.
Solution Summary: How We Fixed the Iterative Macro Issue
After extensive troubleshooting, the root cause was schema consistency and complexity in the loop path. Even though Browse before the Loop showed the correct values, the macro sometimes fell back to the initial input because:
What We Changed
Simplified the loop path:
Unified schema and types:
Guaranteed one row per iteration:
Added guards:
[total_count] > 0 AND [new_last_ts] > [lastTimeStamp]
Optimized macro structure:
Final Macro Flow
Key Lessons
Result: The macro now iterates correctly: