Set Node Overwriting Data Instead of Adding New Fields

Hi everyone, I’m having an issue with the Set node in n8n. I’m trying to add new fields to my data, but instead it seems to overwrite the existing data.
My workflow is:
HTTP Request → Set → Next Node
{
“id”: 1,
“name”: “John”
}In the Set node, I added a new field:
{
“status”: “active”
}
But after the Set node, the output becomes:
{
“status”: “active”
}
So the original fields (id, name) are gone.
I think I might have enabled something wrong, but I’m not sure what.
Is there a way to add fields without removing the existing ones in the Set node?

Describe the problem/error/question

what do I do wrong?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @Keira_Becky
I would turn on “Include Other Input Fields” in the Set / Edit Fields node.

Hi @Keira_Becky This is happening because “Keep Only Set” is enabled in your Set node.

When that option is ON, it removes all existing fields and keeps only what you define in the Set node that’s why id and name disappear. Just turn OFF “Keep Only Set” in the Set node.

After that your output will be

{
“id”: 1,
“name”: “John”,
“status”: “active”
}

2 Likes