⚒️ Master data transformation with the complete set node guide

904 views · ⚒️ Engineering

Description

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:

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)

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)” → “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:

📊 Test Conditional Logic:

🎨 Modify Expressions:

🏗️ Complex Data Structures:

🎓 Learning Path

Beginner Level (Nodes 1-2)

Intermediate Level (Nodes 3-4)

Advanced Level (Nodes 5-6)

🔍 What Each Node Teaches

NodeConceptKey Learning
1. Set Basic ValuesData TypesString, number, boolean basics
2. Set with ExpressionsDynamic Data{{ }} syntax, $json references, $now functions
3. Set Complex DataAdvanced StructuresObjects, arrays, nested properties
4. Set Clean OutputData Management”Keep Only Set” for clean final outputs
5a/5b. Conditional SetsBranching LogicDifferent data based on conditions
6. Tutorial SummaryData AggregationCombining and summarizing workflow data

💡 Pro Tips

🚀 Quick Wins:

🛠️ Advanced Techniques:

🐛 Troubleshooting:

🎯 Next Steps After Tutorial

  1. Create your own Set nodes in a new workflow
  2. Practice with real data from APIs or databases
  3. Build data transformation workflows for your specific use cases
  4. Combine Set nodes with other n8n nodes like HTTP, Webhook, etc.
  5. 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! 🛠️

🔗 Nodes Used

Start

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup