Log selected nested loop iterations to Job report

Recipe Tools

What it does

When the Clock triggers on a specified interval, this automation runs nested loops and logs a message to the Job report only when the nested loop reaches iteration 2.

Who it's for

Engineering teams who need to monitor and log specific iterations from nested loops without processing every result.

How teams use this

Monitor specific nested loop iterations

Run nested loops and log output only from iteration 2 of the inner loop. The condition filters results so the team sees only the data that matters without manual review of every iteration.

Capture output from multiple nested loops

Add more IF conditions to check for other sequence numbers so output is logged from multiple specific iterations, not just iteration 2. Only those matching iterations will be logged to the report.

Debug nested loop failures

Use this pattern to isolate and log errors from a specific nested iteration. When iteration 2 fails, the Job report captures the error context so the team can troubleshoot without re-running the entire loop.

How it works

  1. Start on a specified interval. Clock starts this automation at the scheduled time so the nested loops begin.
  2. Create outer loop with 5 iterations. Create a repeat helper list with size 5 to set up the outer loop that repeats the following steps five times.
  3. Create inner loop with 3 iterations. Inside the outer loop, create a repeat helper list with size 3 to set up the nested loop that repeats the following steps three times per outer iteration.
  4. Check if nested iteration equals 2. Evaluate the sequence number from the nested loop. If it equals 2, the condition is true and the next step runs only on that iteration.
  5. Log message to Job report. When the nested loop reaches iteration 2, log a message to the Job report so the selected output is captured and visible.