Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
This node provides a utility to generate mock user data with customizable fields. It is useful in scenarios where you need realistic but fake user information for testing, development, or demo purposes without exposing real personal data. For example, you can generate multiple users with emails, avatars, passwords, birth dates, usernames, addresses, phone numbers, creation dates, and balances as needed.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Allows defining custom code variables by specifying variable names/IDs and their values. |
| Amount | Number of mock users to generate. |
| Email Domain | Whether to generate an email address for each user (true/false). |
| Avatar | Whether to generate an avatar image URL for each user (true/false). |
| Password | Whether to generate a password string for each user (true/false). |
| Birth Date | Whether to generate a birth date for each user (true/false). |
| Username | Whether to generate a username for each user (true/false). |
| Address | Whether to generate a physical address for each user (true/false). |
| Phone Number | Whether to generate a phone number for each user (true/false). |
| Created At | Whether to generate a "created at" timestamp/date for each user (true/false). |
| Balance | Whether to generate a balance amount for each user (true/false). |
Output
The output is a JSON array containing one or more generated user objects. Each user object includes the requested fields based on the input properties set to true. For example, if emailRequired is true, the user object will include an email field; if avatarRequired is true, it will include an avatar URL, and so forth.
The structure of each user object varies depending on which fields are enabled but generally contains typical user profile attributes such as:
- email (string)
- avatar (URL string)
- password (string)
- birthDate (date string)
- username (string)
- address (string or structured object)
- phone (string)
- createdAt (timestamp or date string)
- balance (numeric)
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authentication to the external service providing the mock data generation.
- The node makes HTTP POST requests to the endpoint path
generate/mockdata/userwith parameters reflecting the selected options. - No other external dependencies or environment variables are explicitly required.
Troubleshooting
Common issues:
- Missing or invalid API key credential may cause authentication errors.
- Requesting too many users (
amount) might lead to rate limiting or timeouts. - Incorrect property types or missing required properties could cause request failures.
Error messages:
- Authentication errors typically indicate problems with the API key setup.
- Validation errors may occur if numeric or boolean inputs are malformed.
- Network or service errors should be retried or checked for connectivity.
To resolve errors, verify that the API key credential is correctly configured, ensure all required properties have valid values, and reduce the amount of generated users if necessary.
Links and References
- n8n Expressions Documentation — for using expressions in variable definitions.
- No direct external links to the mock data service are provided in the source code.