Master Data Transformation with the Complete Set Node Guide
Go to WorkflowDescription
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 $json references
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)" → "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_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 match your expectations
🎯 Next Steps After Tutorial
Create your own Set nodes in a new workflow
Practice with real data from APIs or databases
Build data transformation workflows for your specific use cases
Combine Set nodes with other n8n nodes like HTTP, Webhook, etc.
Explore advanced expressions using JavaScript functions
Congratulations! You now have the foundation to use Set nodes effectively in any n8n workflow. The Set node is truly the "Swiss Army knife" of n8n automation! 🛠️