Generate a random value on a schedule

Recipe ToolsMarketingDeveloper Tool

What it does

When a scheduled time arrives, this automation runs Ruby code to generate a random value. The result is available for other steps to use.

Who it's for

Engineering teams who need a random value generated at regular intervals for testing or data operations.

How teams use this

Generate test data daily

Run the random value generator at a set time each day to create test data for quality assurance. The value is ready for the next step without manual intervention.

Populate test environments with random records

Trigger the random generator hourly and pass the value to a database insert step to keep test environments populated with fresh data for ongoing testing.

Rotate configuration values randomly

Generate a random number at startup and use it to select from a list of environment settings. Only the random seed changes between runs.

Load balance across random endpoints

Generate a random value on each interval and use it to select which API endpoint receives the next request. Add a condition to filter endpoints by region or status.

How it works

  1. Wait for the scheduled time. At the specified interval, the Clock trigger starts this automation and passes control to the next step in the workflow.
  2. Generate a random value with Ruby. Workato Custom Code runs the GetRandom Ruby code to produce a random value that downstream steps can reference or log.