Generate sorted lists with Ruby every 5 minutes

What it does

When the clock triggers every 5 minutes, this automation builds a list and parses data. Custom Ruby code then sorts the results so they are ready for downstream systems.

Who it's for

Engineering teams who need to sort data programmatically on a schedule.

How teams use this

Sort customer records by name

Parse incoming customer data and sort by name or date using Ruby logic. The sorted list is ready for downstream systems every 5 minutes without manual work.

Rank support tickets by priority

Collect support tickets, parse them, and sort by priority level using Ruby logic. This keeps the queue ordered without manual intervention.

Add conditional sorting for business rules

Extend the Ruby code to include conditional sorting by multiple fields or apply domain-specific rules. Only the code block needs to change to add this logic.

How it works

  1. Run every 5 minutes. The Clock triggers this automation on a 5-minute interval so lists are sorted and refreshed regularly without manual intervention.
  2. Parse the data structure. Json Parser extracts and structures the incoming data so it can be processed by the Ruby code that follows in the next step.
  3. Sort using Ruby code. Workato Custom Code runs the Ruby sort logic on the parsed data and returns the ordered list ready for the next system or process.