Master Data Transformation with the Complete Node Set Guide
# n8n Set Node Tutorial - Complete Guide ## How It Works This tutorial workflow teaches you everything about n8n's **Set node** through hands-on examples. The Set node is one of the most powerful tools in n8n - it allows you to create, modify, and transform data as it flows through your workflow. **What makes this tutorial special:** - **Progressive Learning**: Starts simple, builds to complex concepts - **Interactive Examples**: Real working nodes you can modify and test - **Visual Guidance**: Sticky notes explain every concept - **Branching Logic**: Shows how Set nodes work in different workflow paths - **Real Data**: Uses practical examples you'll encounter in automation The workflow demonstrates 6 core concepts: 1. **Basic data types** (strings, numbers, booleans) 2. **Expression syntax** with `{{ }}` and `$json` references 3. **Complex data structures** (objects and arrays) 4. **Keep Only Set** option for clean outputs 5. **Conditional data setting** with branching logic 6. **Data transformation** and aggregation techniques ## Setup Steps ### Step 1: Import the Workflow 1. **Copy the JSON** from the code artifact above 2. **Open your n8n instance** in your browser 3. **Navigate to Workflows** section 4. **Click Import from JSON** or the import button (usually a + or import icon) 5. **Paste the JSON** into the import dialog 6. **Click Import** to load the workflow 7. **Save the workflow** (Ctrl+S or click Save button) ### Step 2: Choose Your Starting Point **Option A: Default Tutorial Mode (Recommended for beginners)** - The workflow is ready to run as-is - Uses simple Welcome message as starting data - **Click Execute Workflow** to begin **Option B: Rich Test Data Mode (Recommended for experimentation)** 1. **Locate the nodes**: Find Start (Manual Trigger) and 0. Test Data Input 2. **Disconnect default**: Click the connection line between Start (Manual Trigger) and 1. Set Basic Values and delete it 3. **Connect test data**: Drag from 0. Test Data Input output to 1. Set Basic Values input 4. **Execute**: Click Execute Workflow to run with rich test data ### Step 3: Execute and Learn 1. **Run the workflow**: Click the Execute Workflow button 2. **Check outputs**: Click on each node to see its output data 3. **Read the notes**: Each sticky note explains what's happening 4. **Follow the flow**: Data flows from left to right, top to bottom ### Step 4: Experiment and Modify **Try These Experiments:** **Change Basic Values:** - Click on 1. Set Basic Values - Modify `user_age` (try 20 vs 35) - Change `user_name` to see how it propagates - Execute and see the changes flow through **Test Conditional Logic:** - Set `user_age` to 20 triggers Student Discount path - Set `user_age` to 30 triggers Premium Access path - Watch how the workflow branches differently **Modify Expressions:** - In 2. Set with Expressions, try changing: - `={{ $json.score * 2 }}` to `={{ $json.score * 3 }}` - `={{ $json.user_name }} Smith` to `={{ $json.user_name }} Johnson` **Complex Data Structures:** - In 3. Set Complex Data, modify the JSON structure - Add new properties to the user_profile object - Try nested expressions ## Learning Path ### Beginner Level (Nodes 1-2) - **Focus**: Understanding basic Set operations - **Learn**: Data types, static values, simple expressions - **Time**: 10-15 minutes ### Intermediate Level (Nodes 3-4) - **Focus**: Complex data and output control - **Learn**: Objects, arrays, Keep Only Set option - **Time**: 15-20 minutes ### Advanced Level (Nodes 5-6) - **Focus**: Conditional logic and data aggregation - **Learn**: Branching workflows, merging data, complex expressions - **Time**: 20-25 minutes ## What Each Node Teaches | Node | Concept | Key Learning | |------|---------|--------------| | **1. Set Basic Values** | Data Types | String, number, boolean basics | | **2. Set with Expressions** | Dynamic Data | `{{ }}` syntax, `$json` references, `$now` functions | | **3. Set Complex Data** | Advanced Structures | Objects, arrays, nested properties | | **4. Set Clean Output** | Data Management | Keep Only Set for clean final outputs | | **5a/5b. Conditional Sets** | Branching Logic | Different data based on conditions | | **6. Tutorial Summary** | Data Aggregation | Combining and summarizing workflow data | ## Pro Tips **Quick Wins:** - Always check node outputs after execution - Use sticky notes as your learning guide - Experiment with small changes first - Copy nodes to try variations **Advanced Techniques:** - Use `Keep Only Set` for API responses - Combine static and dynamic data in complex objects - Leverage conditional paths for different user types - Reference nested object properties with dot notation **Troubleshooting:** - If expressions don't work, check the `{{ }}` syntax - Ensure field names match exactly (case-sensitive) - Use the expression editor for complex logic - Check data types
n8n Set Node Tutorial - Complete Guide
How It Works
This tutorial workflow teaches you everything about n8n's Set node through hands-on examples. The Set node is one of the most powerful tools in n8n - it allows you to create, modify, and transform data as it flows through your workflow.
What makes this tutorial special:
- Progressive Learning: Starts simple, builds to complex concepts
- Interactive Examples: Real working nodes you can modify and test
- Visual Guidance: Sticky notes explain every concept
- Branching Logic: Shows how Set nodes work in different workflow paths
- Real Data: Uses practical examples you'll encounter in automation
The workflow demonstrates 6 core concepts:
- Basic data types (strings, numbers, booleans)
- Expression syntax with
{{ }}and$jsonreferences - Complex data structures (objects and arrays)
- Keep Only Set option for clean outputs
- Conditional data setting with branching logic
- Data transformation and aggregation techniques
Setup Steps
Step 1: Import the Workflow
- Copy the JSON from the code artifact above
- Open your n8n instance in your browser
- Navigate to Workflows section
- Click Import from JSON or the import button (usually a + or import icon)
- Paste the JSON into the import dialog
- Click Import to load the workflow
- Save the workflow (Ctrl+S or click Save button)
Step 2: Choose Your Starting Point
Option A: Default Tutorial Mode (Recommended for beginners)
- The workflow is ready to run as-is
- Uses simple Welcome message as starting data
- Click Execute Workflow to begin
Option B: Rich Test Data Mode (Recommended for experimentation)
- Locate the nodes: Find Start (Manual Trigger) and 0. Test Data Input
- Disconnect default: Click the connection line between Start (Manual Trigger) and 1. Set Basic Values and delete it
- Connect test data: Drag from 0. Test Data Input output to 1. Set Basic Values input
- Execute: Click Execute Workflow to run with rich test data
Step 3: Execute and Learn
- Run the workflow: Click the Execute Workflow button
- Check outputs: Click on each node to see its output data
- Read the notes: Each sticky note explains what's happening
- Follow the flow: Data flows from left to right, top to bottom
Step 4: Experiment and Modify
Try These Experiments:
Change Basic Values:
- Click on 1. Set Basic Values
- Modify
user_age(try 20 vs 35) - Change
user_nameto see how it propagates - Execute and see the changes flow through
Test Conditional Logic:
- Set
user_ageto 20 triggers Student Discount path - Set
user_ageto 30 triggers Premium Access path - Watch how the workflow branches differently
Modify Expressions:
- In 2. Set with Expressions, try changing:
={{ $json.score * 2 }}to={{ $json.score * 3 }}={{ $json.user_name }} Smithto={{ $json.user_name }} Johnson
Complex Data Structures:
- In 3. Set Complex Data, modify the JSON structure
- Add new properties to the user_profile object
- Try nested expressions
Learning Path
Beginner Level (Nodes 1-2)
- Focus: Understanding basic Set operations
- Learn: Data types, static values, simple expressions
- Time: 10-15 minutes
Intermediate Level (Nodes 3-4)
- Focus: Complex data and output control
- Learn: Objects, arrays, Keep Only Set option
- Time: 15-20 minutes
Advanced Level (Nodes 5-6)
- Focus: Conditional logic and data aggregation
- Learn: Branching workflows, merging data, complex expressions
- Time: 20-25 minutes
What Each Node Teaches
| Node | Concept | Key Learning |
|---|---|---|
| 1. Set Basic Values | Data Types | String, number, boolean basics |
| 2. Set with Expressions | Dynamic Data | {{ }} syntax, $json references, $now functions |
| 3. Set Complex Data | Advanced Structures | Objects, arrays, nested properties |
| 4. Set Clean Output | Data Management | Keep Only Set for clean final outputs |
| 5a/5b. Conditional Sets | Branching Logic | Different data based on conditions |
| 6. Tutorial Summary | Data Aggregation | Combining and summarizing workflow data |
Pro Tips
Quick Wins:
- Always check node outputs after execution
- Use sticky notes as your learning guide
- Experiment with small changes first
- Copy nodes to try variations
Advanced Techniques:
- Use
Keep Only Setfor API responses - Combine static and dynamic data in complex objects
- Leverage conditional paths for different user types
- Reference nested object properties with dot notation
Troubleshooting:
- If expressions don't work, check the
{{ }}syntax - Ensure field names match exactly (case-sensitive)
- Use the expression editor for complex logic
- Check data types
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Related bundle
E-commerce Store Automation Suite
8 hand-picked workflows for $39.00.
That is $4.88 each, vs $14.99 for this one alone.
View bundleSecure checkout powered by Stripe
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 Education workflows
- Learn JSON Basics with an Interactive Step-by-Step Tutorial for Beginners$14.99
- Learn n8n Expressions with an Interactive Step-by-Step Tutorial for Beginners$14.99
- Automated AI Degree Audit Using Google Sheets and OpenAI$9.99
- Learn API Fundamentals with an Interactive Hands-On Tutorial Workflow$24.99
- Master Webhook Integration and Security with Supabase in n8n$14.99
- Master JavaScript Code Node with Interactive n8n Tutorial$9.99
More from David Olusola
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.