Actions40
- AI Actions
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Generate Actions
- Operator Actions
- PDF Actions
- Storage Actions
Overview
This node generates a random number within a specified range. You can choose whether the result is an integer or a decimal. This functionality is useful in scenarios where you need to create test data, simulate randomness, or automate processes that require randomization (e.g., generating lottery numbers, randomizing user assignments, or creating randomized tokens).
Practical examples:
- Generating a random order number for testing.
- Assigning users to groups randomly.
- Creating randomized discount codes.
Properties
| Name | Meaning |
|---|---|
| Range Start | The minimum value of the generated number (inclusive). |
| Range End | The maximum value of the generated number (inclusive). |
| Type | Specifies the type of number to generate. Options: Integer, Decimal. |
Output
The output will be a JSON object containing the generated number. The structure typically looks like:
{
"number": <generated_value>
}
Where <generated_value> is the random number generated according to your settings.
Dependencies
- External Service: Requires access to the CodeKit API service.
- Credentials: n8n credential named
codeKitApimust be configured.
Troubleshooting
- Common Issues:
- If the
Range Startis greater thanRange End, the node may return an error or unexpected results. - Missing or invalid credentials (
codeKitApi) will prevent the node from functioning.
- If the
- Error Messages:
"Missing required parameter": Ensure all required fields are filled."Invalid range": Check thatRange Startis less than or equal toRange End."Authentication failed": Verify yourcodeKitApicredentials.