🎓 Learn Code Node (JavaScript) with an Interactive Hands-On Tutorial
    100%
    Automation
    0(0 reviews)
    4604 downloads

    🎓 Learn Code Node (JavaScript) with an Interactive Hands-On Tutorial

    NM

    Curated by n8n Markets team

    Last updated: March 8, 2026

    ## How it works This workflow is a hands-on tutorial for the Code node in n8n, covering both basic and advanced concepts through a simple data processing task. 1. Provides Sample Data: The workflow begins with a sample list of users. 2. Processes Each Item (`Run Once for Each Item`): The first Code node iterates through each user to calculate their `fullName` and `age`. This demonstrates basic item-by-item data manipulation using `$input.item.json`. 3. Fetches External Data (Advanced): The second Code node showcases a more advanced feature. For each user, it uses the built-in `this.helpers.httpRequest` function to call an external API (genderize.io) to enrich the data with a predicted gender. 4. Processes All Items at Once (`Run Once for All Items`): The third Code node receives the fully enriched list of users and runs only once. It uses `$items()` to access the entire list and calculate the `averageAge`, returning a single summary item. 5. Create a Binary File: The final Code node gets the fully enriched list of users once again and creates a binary CSV file to show how to use binary data `Buffer` in JavaScript. ## Set up steps Setup time: < 1 minute This workflow is a self-contained tutorial and requires no setup. 1. Explore the Nodes: Click on each of the Code nodes to read the code and the comments explaining each step, from basic to advanced. 2. Run the Workflow: Click "Execute Workflow" to see it in action. 3. Check the Output: Click on each node after the execution to see how the data is transformed at each stage. Notice how the data is progressively enriched. 4. Experiment! Try changing the data in the `1. Sample Data` node, or modify the code in the Code nodes to see what happens.

    What's Included

    • Complete n8n workflow template with 0 nodes. Ready to import and customize.

    Requirements

    n8n instance (self-hosted or cloud). credentials.

    How to Use

    1. Download the workflow JSON 2. Import into your n8n instance 3. Configure credentials for 4. Activate and enjoy automation

    How to import this template into n8n

    1. Download the workflow JSON file from this page.
    2. In n8n, open Workflows, create a new workflow and choose Import from File.
    3. Open each node that shows a warning and connect your own credentials.
    4. Run the workflow once manually to check the output before you activate it.
    Included in Pro
    • Importable n8n workflow JSON file
    • Download with Builder Pro or Agency Unlimited
    • Built for n8n v1.0++
    • Setup time: 5-15 min

    Included in Builder Pro — $19/mo, 4,177 premium workflows

    Before you activate

    Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.

    Updated Mar 2026
    v1.0
    SSL
    Secure
    GDPR

    100% Secure Checkout

    Refund requests within 7 days of a new subscription

    Reviews

    0

    No reviews yet

    See all 0 reviews ↓
    —

    0 reviews

    5★
    0
    4★
    0
    3★
    0
    2★
    0
    1★
    0

    No reviews yet.

    Questions & Answers

    0

    Log in to ask a question.

    No questions yet. Be the first to ask!

    People Also Bought