# MongoDB node update key doesn't seem to support dot notation

**URL:** <https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142>\
**Category:** Questions\
**Tags:** node, mongodb\
**Created:** [September 14, 2024, 8:26pm UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142 "2024-09-14T20:26:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mig82](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mig82/32/25138_2.png) [@mig82](https://community.n8n.io/u/mig82)\
**Post date:** [September 14, 2024, 8:26pm UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/1 "2024-09-14T20:26:24Z")

</div>

## Describe the problem/error/question

MongoDB node update key doesn’t seem to support dot notation. I’m trying to use the node’s ‘Find and Update’ operation and setting `Update Key` to `profile._email`. It won’t find any documents by this key. I also have `Use Dot Notation` enabled.

## What is the error message (if any)?

No error message. Just an empty output.

## Please share your workflow

```auto
  "meta": {
    "instanceId": "5154940e748bd1f69d9f0fc392aa0cc778fdac6909978070fda1ccee64c352cc"
  },
  "nodes": [
    {
      "parameters": {
        "operation": "findOneAndUpdate",
        "collection": "users",
        "updateKey": "profile._email",
        "fields": "cv, profile, pca, vs, files",
        "upsert": true,
        "options": {}
      },
      "id": "307cc52e-2024-4c46-87fb-dd0665b33495",
      "name": "upsertUser",
      "type": "n8n-nodes-base.mongoDb",
      "typeVersion": 1.1,
      "position": [
        5920,
        1020
      ],
      "alwaysOutputData": true,
      "credentials": {
        "mongoDb": {
          "id": "vGFwHpAB4KAPgI12",
          "name": "atlas_dev"
        }
      }
    }
  ],
  "connections": {},
  "pinData": {}
}

```

## Share the output returned by the last node

```auto
[
  {}
]

```

## Information on your n8n setup

- **n8n version:** 1.53.2
- **Database (default: SQLite):** SQLite
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** own
- **Running N8N via:** npm
- **Operating system:** MacOS

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [September 14, 2024, 8:26pm UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/2 "2024-09-14T20:26:25Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![mig82](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mig82/32/25138_2.png) [@mig82](https://community.n8n.io/u/mig82)\
**Post date:** [September 18, 2024, 9:35am UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/3 "2024-09-18T09:35:20Z")

</div>

I’ve updated the question with all the relevant data.

---

<div class="post-metadata">

**Author:** ![mig82](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mig82/32/25138_2.png) [@mig82](https://community.n8n.io/u/mig82)\
**Post date:** [September 18, 2024, 9:39am UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/4 "2024-09-18T09:39:32Z")

</div>

Actually, I think the MongoDB node’s ‘Update’ and ‘Find and Update’ operations either don’t work at all or are not properly documented.

I can’t manage to update an existing doc. The proper way to use the ‘Update Key’ field is unclear to me, but I’ve tried both `id` and `_id` to try to find the document to update, and I tried both the ‘Update’ and ‘Find and Update’ operations without succes. BTW, the difference between these two operations is also not entirely clear. The documentation for the MongoDB node could be way better.

---

<div class="post-metadata">

**Author:** ![ria](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ria/32/99251_2.png) [@ria](https://community.n8n.io/u/ria)\
**Post date:** [September 23, 2024, 10:41am UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/5 "2024-09-23T10:41:51Z")

</div>

Hi @mig82

Can you share a bit more about your setup? What’s the structure of your MongoDB collection that you are trying to update?

Reminds me of a similar post - perhaps this could help?

> [@MongoDB update / find and update running but not working for me](http://community.n8n.io/t/mongodb-update-find-and-update-running-but-not-working-for-me/51573/4):
>
> I have the same issues, anybody knows if its about a n8n internal problem?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [December 22, 2024, 10:42am UTC](https://community.n8n.io/t/mongodb-node-update-key-doesnt-seem-to-support-dot-notation/54142/6 "2024-12-22T10:42:11Z")

</div>

Closed on December 22, 2024, 10:42am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
