// guides · n8n error index

n8n Edit Fields (Set) node not working: dropped fields, type errors and invalid JSON, 29 runs

Fix the n8n Edit Fields (Set) node: other fields disappearing, "expects a number but we got", Boolean and Array type errors, {{ }} staying literal, null values, nested dot names and "contains invalid JSON". 29 real runs on n8n 2.43.7.

Updated 2026-10-24 · about 10 minutes

Still stuck after these steps? Paste your exact n8n error and we'll reproduce it and email you the fix, free →

Steps

  1. Turn on Include Other Input Fields if the rest of your data vanished

    By default Edit Fields outputs only the fields you set; every other input field is dropped, with no warning. In all our runs with the default, the next node saw just the new fields. Turn on Include Other Input Fields and pick All, Selected or All Except. With Selected name, email, an item without email just came out without it (no error). Setting a field with the same name as an input field overwrites it in place and keeps the rest.

  2. Read the type error: the item number starts at 0

    With Type Number and a value of abc on the second item, the run failed with 'total' expects a number but we got 'abc' [item 1]. [item 1] is the second item, because the count starts at 0. 12,50 fails the same way, since a comma is not a decimal point: use {{ Number(String($json.amount).replace(',', '.')) }} (gave 12.5). Boolean only accepts true/false: yes failed with 'on' expects a boolean but we got 'yes' [item 0], while the strings true and false converted fine.

  3. Don't hide type errors with Ignore Type Conversion Errors

    That option made the run green, but the bad value stayed the string abc (not null, not 0), so math further down broke silently. Watch empty values too: with Type Number, both "" and "0" became 0, so an empty field looks like a real zero. If empty should mean missing, use an expression such as {{ $json.amount === '' ? null : Number($json.amount) }}.

  4. Arrays and objects must be JSON text or real values

    Type Array accepted the text ["a","b"] but a,b failed with 't' expects a array but we got 'a,b' [item 1]; use {{ $json.tags.split(',') }}. Type Object accepted {"k":1} and rejected plain text with expects a object.

  5. Expressions need Expression mode, and typos give null

    A value typed as Hi {{ $json.name }} in Fixed mode came out literally as Hi {{ $json.name }}. Switch the field to Expression (or start it with =). Inside an expression, a typo like $json.emial or a missing parent like $json.address.city gave null with no error or warning, so compare the field names with the input panel when a value is empty. An empty field name silently created a key "".

  6. Dots in names create nested objects

    A field named user.name produced {"user": {"name": "Ana"}}, not a key with a dot. If you really want the dot in the key, turn Options > Support Dot Notation off (it is on by default).

  7. In JSON mode, build the object with an expression

    Mode JSON with {"who": "{{ $json.name }}"} worked until a name contained a double quote; then the run failed with The 'JSON Output' in item 0 contains invalid JSON. The safe form is a full expression: ={{ { who: $json.name, user: $json.user } }} gave a clean object, nested values included, whatever the text contains. n8n 2.43.7 also accepted an unquoted value and a trailing comma, but don't rely on that lenience.

  8. Parse dates with the right format

    Edit Fields doesn't fail on bad dates. {{ DateTime.fromISO($json.date) }} on 24/10/2026 returned the text Invalid DateTime with a green run. Use {{ DateTime.fromFormat($json.date, 'dd/MM/yyyy') }} for day/month/year text. More on dates: n8n timezone or date wrong.

What we ran

On 24 October 2026 we ran 29 executions on n8n 2.43.7 with n8n execute: a Manual Trigger, a Code node sending two items, the Edit Fields (Set) node (version 3.4, one run on 3.3), then a No Op node. We read every output item.

SetupResult
Type Number, second item abc'total' expects a number but we got 'abc' [item 1]
Same, Ignore Type Conversion Errors onSuccess; item keeps the string abc
Type Number, 12,50'total' expects a number but we got '12,50' [item 0]
Number(String(x).replace(',', '.'))12.5 and 3.25
Type Number, "" and "0"Both 0, no error
Type Boolean, yes/no'on' expects a boolean but we got 'yes' [item 0]
Type Boolean, "true"/"false"Converted to true/false
Type Array, ["a","b"] and a,bJSON text parses; a,b fails: 't' expects a array but we got 'a,b' [item 1]
Type Object, {"k":1} and nopeJSON text parses; plain text fails: expects a object
Name user.name, dot notation on (default)Nested {"user":{"name":"Ana"}}
Same, Support Dot Notation offLiteral key user.name
Include Other Input Fields off (default)Only the set fields; everything else dropped
Include Other Input Fields, AllAll input fields plus the new one
Include Selected name, email, item without emailJust name plus the new field, no error
All Except user,tagsBoth fields dropped
Hi {{ $json.name }} in Fixed modeLiteral text Hi {{ $json.name }}
Typo $json.emialnull, no error
$json.address.city, address missingnull, no error
Same name as an input field, others includedOverwritten in place, other fields kept
Empty field nameKey "" created silently
JSON mode, "{{ $json.name }}" and {{ $json.qty || 0 }}{"who":"Ana","n":3}, {"who":"Bo","n":0}
JSON mode, unquoted value / trailing commaAccepted in 2.43.7
JSON mode, ={{ { who: $json.name, user: $json.user } }}Clean object, nested included
JSON mode, name containing a double quoteThe 'JSON Output' in item 0 contains invalid JSON
DateTime.fromISO on 24/10/2026Text Invalid DateTime, no error
Version 3.3, Number abcSame error as 3.4
Type String on a missing user.idnull (not "undefined")

Good to know

What we didn't test

FAQ

Why does the n8n Edit Fields (Set) node remove my other fields?

By default it outputs only the fields you set. Turn on Include Other Input Fields and choose All, Selected or All Except to keep the rest.

What does 'expects a number but we got' mean in n8n?

The field's Type is Number but the value can't be read as one, like 'abc' or '12,50'. The [item N] number starts at 0. Fix the value or convert it with an expression; Ignore Type Conversion Errors only hides it and keeps the text.

Why does my expression show up as text in the Set node?

The field is in Fixed mode. Switch it to Expression, or start the value with =, and the {{ }} part is evaluated.

Why is my Edit Fields value null?

The expression points to a field that doesn't exist, often a typo or a missing parent object. n8n returns null without an error, so check the names in the input panel.

How do I fix 'The JSON Output contains invalid JSON' in n8n?

A value put inside quotes in JSON mode contained a quote or line break. Build the whole output as an expression instead, like ={{ { who: $json.name } }}, or use JSON.stringify for the value.

Related guides

New guides

Still stuck on your n8n error?

Paste the exact error and say what the workflow should do. We reproduce it on a real n8n install and email you the fix or a working workflow, usually within 24h. Free while we're in beta.

We'll only email you about your error and TaskToAgent.