Generate sample data records using the n8n Code node (JS/Python) and split them into individual items using the n8n Split Out node. Essential for testing complex n8n workflows and prototyping logic.
Download this n8n workflow template and start using it instantly.
n8n Developers and Automators: Those who need reliable, self-contained sample data for unit testing downstream processes.
Prototypers: Users quickly mapping data structures or testing list-based logic without relying on external APIs or databases.
Technical Content Creators: Individuals needing simple, reusable n8n templates demonstrating the power of the n8n Code node.
Flow Control Learners: Anyone looking to understand how the crucial n8n Split Out node manages item processing.
This fundamental n8n workflow provides a robust method for testing and prototyping automation paths without incurring costs or delays associated with external services. The primary goal is to generate 20 consistent, dummy records internally within n8n and then fan them out so that subsequent nodes process them one at a time.
This template demonstrates how the versatile n8n Code node can be utilized—offering implementations in both JavaScript and Python—to dynamically create complex data structures. The generated array is then perfectly prepared for the n8n Split Out node, which handles the essential task of transforming a single input item containing a list into multiple individual items. This is a crucial concept for anyone building advanced n8n automation, ensuring that every record in a batch receives separate attention from every downstream n8n node.
This automation is initiated by a manual n8n trigger and immediately branches into two identical paths, demonstrating the same logic using different coding languages:
Start Workflow n8n trigger, designed for manual execution when prototyping or testing.Code nodes (Generate Data Javascript and Generate Data Python). Both nodes execute a script that generates an array of 20 objects, each containing index, num, and test fields. This array is attached to the input item under the key barr. This technique ensures the code runs efficiently within the n8n node environment.Split Out n8n node. This specific n8n node is configured to look at the barr field. It executes the core flow control logic, splitting the array into 20 distinct output items. Each item now represents one of the generated records.Split Out step, the n8n workflow is ready to map, transform, or send these individual data items to any target service (e.g., Google Sheets, a database, or another integration). This pattern is essential for reliable batch processing within any advanced n8n workflow.To start using this n8n workflow, follow these steps:
Split Out nodes.The core functionality of this n8n workflow relies on the synergistic relationship between the Code node and the Split Out node.
Start Workflow (Manual n8n Trigger)
Function: Serves as the initiation point for the n8n workflow, allowing manual testing.
Key Configuration: Standard manual trigger setup.
Generate Data Javascript (n8n Code node)
Function: Uses JavaScript to programmatically create an array of 20 sample objects, useful for complex data creation in an n8n environment.
Key Configuration: The script generates 20 records and attaches the resulting array to item.json.barr.
Generate Data Python (n8n Code node)
Function: Achieves the identical result as the JavaScript version but using Python's list comprehension capabilities, demonstrating multi-language support within the n8n node structure.
Key Configuration: Language set to Python. Returns a list containing one item with the array attached to the barr key.
Split Out Javascript / Split Out Python (n8n Split Out node)
Function: The essential flow control n8n node that transforms a single input item containing an array into multiple output items (one for each element in the array). This is vital for processing data batches.
Key Configuration: Field To Split Out is set to barr, targeting the array generated by the preceding n8n node.
Use this comprehensive n8n workflow to generate professional, formatted PDFs from AI-driven Markdown content using Google Docs, archive the result in Google Drive, and instantly share it on Slack. This n8n workflow eliminates external libraries.

Use this powerful n8n workflow to automatically generate personalized contracts using Typeform submissions, fill Google Docs templates, export as PDF, and send via Gmail.

Use this comprehensive n8n workflow to automatically generate structured, high-quality AI news newsletters using an AI Agent (GPT-4) and send them with perfect HTML formatting via the Gmail n8n node. Download the n8n templates today.

Use this comprehensive n8n workflow to automate AI image generation via OpenAI (DALL-E) and seamlessly manage the resulting files in Azure Blob Storage. Perfect for learning n8n templates.

Use this powerful n8n workflow to generate 'Image to Image' AI art via the Sora GPT API, automatically convert base64 output, store files in Google Drive, and log all generation activity in Google Sheets. Perfect for scaling content creation.

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.







































