Sync Lookup Table entries on schedule

Recipe ToolsMarketingDeveloper Tool

What it does

When a scheduled trigger fires every 5 minutes, this automation retrieves all entries from the Lookup Table and sorts them using custom code. Downstream processes always receive data in the correct order.

Who it's for

Operations teams who need lookup data kept in sorted order without manual intervention.

How teams use this

Keep reference data alphabetically sorted

Sort lookup entries by name every 5 minutes so reports and forms always display options in alphabetical order without manual work.

Maintain priority-based lookup order

Sort entries by priority field so critical items appear first in downstream systems. The automation ensures consistent order across all integrations.

Add custom sort logic for specific fields

Modify the Ruby code to sort by multiple fields or apply conditional logic. Include a secondary sort field so entries are ordered by primary then secondary criteria.

How it works

  1. Run on a 5-minute schedule. The automation starts every 5 minutes so lookup data stays current and sorted for all downstream uses.
  2. Retrieve all lookup entries. Fetch all entries from the Lookup Table in a batch so the custom code can sort and reorganize them.
  3. Sort entries with Ruby code. Execute Ruby code to sort the retrieved entries in the required order so they are ready for other processes.