MongoDB Find & Update A Sub-doc Without Replacing Adjacent Data

Perhaps I’m mis-reading the Mongo docs but it should be possible to find and update a MongoDB subfield without wiping adjacent fields using dot notation. Otherwise, I have to update the entire sub-doc so nothing gets deleted. Am I missing something about how n8n implements Mongo?

When I execute the workflow below, the existing data in “users” gets replaced with the updated “city”.

Information on your n8n setup

  • n8n@1.89.2
  • MongoDB Atlas 8.0.8
  • n8n cloud
  • Macos 15.4.1

Interestingly, if I disable “Use Dot Notation” in the updating MongoDB node, the “city” field is saved correctly without wiping the adjacent data but it’s value is null.