GenAI Unplugged

How to Use Set Node in n8n | Edit Fields Node | Add, Edit, Clean Data

n8n renamed the Set node to Edit Fields. Learn how it works, how to add, edit and clean data, and how to choose which input fields go forward.

The Set node in n8n, renamed Edit Fields in newer versions, adds, edits, renames, or removes fields on the items in your workflow. Use Manual Mapping to add each field and value, or JSON mode to define the whole output object. With Include Other Input Fields off, only the fields you set go forward.

Table of contents

Overview

This lesson is part of the n8n AI Automation - Zero to Hero course, Section: 3. Deep Dive Concepts.

Watch the video above for the full tutorial, or read the written guide below.

What Is the Set Node (Edit Fields) in n8n?

The Set node, renamed Edit Fields in newer n8n versions, creates, edits, renames, or removes fields on the data items flowing through your workflow. It is how you shape, clean, and standardize data between two nodes without writing code, using either a visual field mapper or raw JSON. Think of it as the node that decides exactly what data moves forward.

How to Use the Set Node in n8n

Add an Edit Fields (Set) node, then pick a mode. Manual Mapping lets you add each field name and value, dragging in values from earlier nodes as expressions. JSON mode lets you define the whole output object at once. Leave Include Other Input Fields off to drop every other field and pass a clean payload to the next node or API.

Common uses: rename keys to match an API, set default values, type-cast strings to numbers, or trim a large object down to only the fields the next step needs.

Key Takeaways

  • The Edit Fields node, also called the Set node, does three jobs: it removes fields you do not need, formats values (for example, every last name in uppercase), and replaces null or NaN values with a fixed default so the data stays consistent.
  • JSON mode outputs only the object you write. In the lesson, a test with two sample fields dropped every input field, so use it when you want the data to start fresh.
  • In Manual Mapping, dragging an input field into a value turns the box into an expression that reads from $json, the current item. Drag first name and last name in with a space between them and you get a new full name field.
  • Turn on Include Other Input Fields to keep the rest of the item. Then pick All Except and list first name and last name, so only the new full name goes forward.
  • A value can be decided by an expression. $now with its diffTo method counts the days since the order date, and a ternary (condition ? true value : false value) marks orders older than 45 days as high priority and the rest as standard.

Next Steps

Continue your n8n journey with the full n8n AI Automation - Zero to Hero course.

Frequently asked questions

What will I learn in this lesson?

The Set node, now called Edit Fields, lets you add, edit, rename, or remove fields on items moving through an n8n workflow. You will learn both Manual Mapping and JSON modes, and how Include Other Input Fields decides what reaches the next node.

Do I need to watch the previous lessons first?

This lesson builds on earlier concepts. If you are new to n8n, start with Lesson 1 for the best learning experience.

Can I get help if I get stuck?

Join the GenAI Unplugged community on Substack where Dheeraj answers questions and shares additional tips.

Dheeraj Sharma

AI Systems Builder
I teach founders, creators and tech teams to build production-grade AI systems, without an enterprise budget. 20 years of enterprise engineering, now in plain English.

Get the n8n Mastery Bundle

All workflows, cheat sheets, and premium resources from the entire course in one package.

Get Premium Resources