Generate & Split Sample Data with JS/Python Code Nodes
Plug-and-play n8n workflow generates 20 sample records via JavaScript or Python Code nodes, then splits into individual items for easy testing and prototyping.
This minimal workflow demonstrates generating sample data records using n8n's Code node in both JavaScript and Python implementations. It creates an array of 20 records with fields like index, num, and test, stores it in item.json.barr, and uses the Split Out node to fan out the array into one item per record. This setup is ideal for testing downstream nodes, mappings, pagination, or list-based logic without relying on real data sources.
Perfect for developers, educators, and builders needing mock data to prototype automations. It saves time by providing a clean scaffold for loops and data processing, allowing quick iteration on complex workflows. Use the JS or Python branch interchangeably based on preference—no external setup or credentials required.
Customization is straightforward: adjust the loop range for more/fewer rows, add fields like name or price, incorporate randomization, or pipe output into Set, Function, or other nodes. Import, execute, and extend for your testing needs in any n8n environment.
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Secure checkout powered by Stripe
Tags
Support
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related Travel & Hospitality workflows
- Automate Restaurant Reservations with AI and Telegram$14.99
- Automate Restaurant Reservations with AI and Google Sheets$9.99
- Automate Restaurant Reservations via WhatsApp with AI and Google Sheets$14.99
- Automate Restaurant Call Handling and Table Booking with VAPI and PostgreSQL$9.99
- Automate Flight and Hotel Bookings with AI and API Integration$14.99
- Hotel Guest Journey Automation with Gmail & Google Sheets$14.99
More from Arjun Radu
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.