Generate iterative sum on schedule

Recipe ToolsMarketing

What it does

When a scheduled trigger fires every 5 minutes, this automation creates variables and loops through a list to sum numbers 1 to 100. The total is logged to the job report so someone can track the result.

Who it's for

Data and analytics teams who need to run iterative calculations on a schedule.

How teams use this

Track iterative calculations in reports

Run the sum calculation every 5 minutes and log each result to the job report. Teams can review the history of calculations without manual intervention.

Adjust the schedule for different intervals

Change the Clock trigger to run every hour or every day instead of every 5 minutes. The loop and logging stay the same, only the frequency changes.

Sum a different range of numbers

Modify the repeat helper list to include a different set of numbers or range. Add conditional logic to sum only values that meet a specific condition.

How it works

  1. Run on a 5-minute schedule. Clock triggers this automation to start every 5 minutes so the iterative sum calculation runs at regular intervals throughout the day.
  2. Set up variables and list. Create a total_count variable and a repeat helper list to prepare for the loop that will sum numbers 1 to 100.
  3. Loop through and sum. For each item in the list, update the total_count variable by adding the current number to the running total.
  4. Log the result. Write the final total_count to the job report so the sum of 1 to 100 is recorded and visible.