Generate a random number on schedule

Recipe ToolsDeveloper Tool

What it does

When a scheduled time arrives, this automation runs Ruby code in Workato Custom Code to generate a random number. The output is logged to the job report so someone can verify the result.

Who it's for

Engineering teams who need a reusable random number generator for testing or data workflows.

How teams use this

Inject random data into test workflows

Call this automation from a test workflow to inject a random number into records or messages. The reusable output keeps test data fresh without manual entry each time.

Create unique identifiers for records

Use the random number as part of a unique identifier when creating records in a downstream system. Add formatting to prepend or append the number to a prefix or suffix for the complete ID.

Feed load tests with varied inputs

Call this automation multiple times in a load test to feed different random numbers into performance checks. Each run logs its output so results can be traced back to the job report.

How it works

  1. Start on a scheduled interval. At the scheduled time, this automation wakes up and begins the random number generation process.
  2. Generate random number with Ruby. Workato Custom Code runs Ruby code that produces a random number and stores it as an output variable for the next step or for a calling workflow.
  3. Log result to job report. Write the generated random number to the job report so someone can verify the output ran successfully and review the generated value.