Log iterative counts on a schedule

Recipe ToolsMarketing

What it does

When the clock triggers every 5 minutes, this automation loops through a list and increments a counter for each item. It logs the progress to the job report so someone can monitor what was processed.

Who it's for

Operations teams who need to process items on a fixed schedule and track the results.

How teams use this

Count items processed every 5 minutes

Run a scheduled task that counts items as they loop through and logs the total to the job report. The team can check the report to confirm the automation ran and how many items were handled.

Run the loop on a different interval

Change the clock trigger to run every 1 minute, 10 minutes, or hourly instead of every 5 minutes. The loop and logging remain the same and only the timing changes.

Filter items before counting

Add a condition in the loop so only items that meet a certain rule are counted and logged. This lets the automation skip items that do not need processing.

Alert a team when count reaches a threshold

Include a check after the loop so if total_count exceeds a set number, a notification is sent to a channel. The team knows immediately when processing volume is high.

How it works

  1. Start on a 5-minute schedule. The clock starts this automation every 5 minutes without anyone having to do anything.
  2. Initialize the counter variable. Create a variable named total_count set to zero so the loop can increment it as items are processed.
  3. Build the list to iterate. Create a repeat helper list that contains all the items this automation will loop through in the next step.
  4. Loop and count each item. For each item in the list, increment total_count by one and continue until all items in the list are counted.
  5. Log the count to the job report. Write a message to the job report showing the total_count value so someone can see how many items were processed.