Create and process an array on a schedule

Recipe ToolsMarketing

What it does

When Clock triggers every 5 minutes, this automation builds an array with multiple items. It loops through each item and concatenates them based on position so the final result is ready for downstream use.

Who it's for

Engineering teams who need to transform and combine data at regular intervals without manual intervention.

How teams use this

Combine array items into a string

Build an array on a schedule, loop through each item, and concatenate them into one variable. The automation handles first and last item logic so the output is properly formatted for downstream use.

Send formatted data to a webhook

Process the array every 5 minutes and pass the concatenated result to an external API or webhook. Only the destination endpoint changes while the array logic stays the same.

Add custom delimiters between items

Extend the concatenation logic to include a delimiter such as a comma or pipe between items. Set the delimiter in the update variable step so the output matches your data format.

How it works

  1. Fire every 5 minutes. Clock fires this automation on a 5-minute schedule so the array is built and processed at regular intervals.
  2. Build and populate the array. Clock creates an array list and adds multiple items to it. The array holds the data that will be processed in the loop.
  3. Loop and concatenate each item. For each item in the array, Clock checks if it is the first or last item. Concatenate the variable based on position so the output is formatted correctly.
  4. Update the concatenated result. Clock updates the concatenated variable as the loop processes each item. The final result is ready for use after all items are processed.