Product
AI-generatedOverview
This node generates fake data using the Faker.js library. It is useful for testing, prototyping, or populating applications with realistic but non-sensitive sample data. For example, you can generate fake product details to test an e-commerce platform or create dummy user profiles for UI development.
In this specific configuration, the node focuses on generating fake product information, such as product names, prices, descriptions, categories, materials, and SKUs.
Properties
| Name | Meaning |
|---|---|
| Number of Records | Number of fake product records to generate (e.g., 1, 5, 10). |
Output
The output is an array of JSON objects, each representing a fake product record with the following fields:
productName: A generated product name.price: A generated price value.description: A generated product description.category: The product category or department.material: The material of the product.sku: A generated SKU code (using ISBN format).
Each item is wrapped in an object with a json key, e.g.:
{
"json": {
"productName": "Awesome Granite Table",
"price": "123.45",
"description": "A beautiful granite table perfect for any home.",
"category": "Furniture",
"material": "Granite",
"sku": "978-3-16-148410-0"
}
}
The node does not output binary data.
Dependencies
- Uses the external Faker.js library (
@faker-js/faker) to generate fake data. - No external API keys or services are required.
- No special n8n environment variables or credentials needed.
Troubleshooting
- Common issues:
- If the number of records is set to zero or a negative number, no data will be generated.
- Large numbers for "Number of Records" may cause performance delays or memory issues.
- Error messages:
- Errors related to Faker.js usage are unlikely unless the library is missing or corrupted.
- Ensure the node parameter "Number of Records" is a valid positive integer to avoid unexpected behavior.