Generate String
Generates a random alphanumeric string of specified length.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Delay After (sec) -** Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- String Length - The desired length of the random string (must be positive).
Options
This node does not have configurable options.
Output
- Random String - A randomly generated string containing only letters (a-z, A-Z).
How It Works
The Generate String node creates a random string using:
- Character set: Letters only (a-z, A-Z) - 52 possible characters
- Random selection: Each character is randomly selected
- No numbers or special characters - only alphabetic characters
- Case-mixed: Contains both uppercase and lowercase letters
- Length specified by input
Usage Examples
Example 1: Generate 10-Character String
- String Length:
10 - Random String:
"aBcDeFgHiJ"(example output, will be different each time)
Example 2: Generate Short Code
- String Length:
6 - Random String:
"XyZaBc"(example)
Example 3: Generate Long Key
- String Length:
32 - Random String: 32 random letters
Error Handling
Invalid Length Error:
String Length: 0
Error: "String length cannot be negative or zero"
String Length: -5
Error: "String length cannot be negative or zero"
Tips
- Use for generating temporary identifiers
- Great for test data generation
- Perfect for verification codes (if letters-only is acceptable)
- Not cryptographically secure - don't use for passwords or tokens
- Each call generates a different random string
- Only contains letters (no numbers or special characters)
- For unique IDs across systems, use GenerateUUID instead
Common Errors and Solutions
Error: "String length cannot be negative or zero"
- Cause: Length is 0 or negative
- Solution: Provide a positive integer (1 or greater)
Error: Need numbers or special characters in output
- Cause: This node only generates letters
- Solution: Combine with other nodes or use custom generation logic
Error: Need cryptographically secure random string
- Cause: This uses basic random generation
- Solution: For security-critical applications, use a dedicated secure random generator
Practical RPA Examples
Example: Generate Temporary Filename
Length: 12
Generated: "aBcDeFgHiJkL"
Concatenate: "temp_" + generated + ".txt"
Result: "temp_aBcDeFgHiJkL.txt"
Use: Unique temporary file
Example: Create Test User IDs
Length: 8
Generated: "XyZaBcDe"
Prefix: "TEST_"
Result: "TEST_XyZaBcDe"
Use: Test user identifier
Example: Generate Session Identifier
Length: 16
Generated: 16-character random string
Use: Temporary session ID (not for production security)
Example: Create Placeholder Text
Length: 20
Generated: Random 20-letter string
Use: Placeholder for testing
Example: Generate Verification Code
Length: 6
Generated: "AbCdEf"
Uppercase: "ABCDEF"
Use: Email verification code (letters only)
Pattern: Create Unique Filename
Generate unique temporary files:
Step 1: Generate random string (12 chars)
Step 2: Get current timestamp
Step 3: Concatenate: timestamp + "_" + random + ".tmp"
Result: "20240115_120000_aBcDeFgHiJkL.tmp"
Pattern: Generate Test Data
Create random test users:
Step 1: Generate random string (8 chars)
Step 2: Lowercase → username
Step 3: Concatenate with domain
Result: "abcdefgh@test.com"
Pattern: Create Reference Code
Generate reference numbers:
Step 1: Get date → "20240115"
Step 2: Generate random string (6 chars)
Step 3: Uppercase random string
Step 4: Concatenate: date + "-" + random
Result: "20240115-ABCDEF"
Security Considerations
warning
Not for Security Use
- Do NOT use for passwords
- Do NOT use for authentication tokens
- Do NOT use for cryptographic keys
- Do NOT use for security-sensitive identifiers
This node uses basic random generation and is NOT cryptographically secure.
Appropriate Uses
- Temporary file names
- Test data
- Non-security placeholders
- Display purposes
Inappropriate Uses
- User passwords
- API keys
- Session tokens
- Security codes
Comparison with GenerateUUID
| Feature | GenerateString | GenerateUUID |
|---|---|---|
| Format | Custom length letters | Standard UUID format |
| Uniqueness | Random, possible collisions | Globally unique |
| Length | Variable (you specify) | Fixed (36 characters) |
| Characters | a-z, A-Z only | Numbers, letters, hyphens |
| Use Case | Temporary IDs, test data | Permanent unique IDs |
Combining with Other Nodes
With Uppercase
Generate → "aBcDeF"
Uppercase → "ABCDEF"
Use: Uppercase verification codes
With Concatenate
Prefix: "TEMP_"
Generate: "aBcDeF"
Suffix: "_001"
Result: "TEMP_aBcDeF_001"
With Replace
Generate: "aBcDeF"
Replace "a" with "1"
Replace "e" with "3"
Result: "1BcD3F" (custom character substitution)
Related Nodes
- GenerateUUID - Generate globally unique identifier
- Uppercase - Convert to all caps
- Lowercase - Convert to all lowercase
- Concatenate - Add prefix/suffix