MongoDB node Update or Find&Update doesn't commit

Describe the problem/error/question:

I’m trying to use the MongoDB Update node and I’ve also tried Find and Update. Neither commits the update and I can’t find the problem.

I have a SET node before MongoDB and I configured it to generate the update on a property.

Has anyone else been through the same thing or have any suggestions for a workaround?


Please share your workflow

Information on your n8n setup

  • n8nVersion: 1.90.2
  • platform: npm
  • nodeJsVersion: 20.19.1
  • database: sqlite
  • executionMode: regular
  • concurrency: -1

Hey Patrick, we help teams scale workflows with tools like n8n and we’ve run into similar MongoDB update quirks happy to pitch in.

From your flow and screenshots, it looks like the updateKey you’re passing (idData) might not be getting matched properly in MongoDB. Here’s a quick checklist that’s helped us debug this kind of issue:

:zap: What to Check:

  1. Update key mismatch?
    You’re using ={{ $json.idData }} - but make sure your collection has a field named idData (not _id) and that the value format matches exactly. Even a slight string mismatch will cause the update to silently fail.
  2. Find + Update might be safer:
    We’ve had better consistency using the Find and Update node with a manual filter like:
{
  "idData": "554799999999_30/05/2025"
}
  • just to guarantee control over what’s being matched.
  1. Always Output Data:
    Flip that switch on in the MongoDB node to make debugging easier it’ll let you confirm if any record was actually matched.

  2. Upsert is great, but…
    If no document matches, a new one will be inserted. That’s fine if expected but can hide matching issues during testing.

  3. MongoDB role permissions:
    Make sure the connected user has update permissions and the IPs are whitelisted.

If none of that works, we’d be happy to take a closer look. Feel free to DM or share a trimmed version of the workflow. Also, we recently helped a team automate an AI-integrated lead pipeline.

Team Hashlogics
:link: https://hashlogics.com

Thank you for your response, Hashlogics.

Update key mismatch?
Yes, you can see in the MongoDB screenshot that the key matches.
I’ve already tried using the _id generated by MongoDB as the unique key, but that didn’t work either.

Find + Update might be safer:
In n8n, I tried both the Update and Find & Update options — same result :confused:

Always Output Data:
I didn’t enable it because it just returns empty keys.

MongoDB role permissions:
Yes, I’m using the same credentials in MongoDB Compass as I use in n8n, and I’m able to perform updates successfully.

Hello everyone!

It wasn’t an error in the creation of the workflows, but rather an issue with the n8n version.
After updating from 1.190.2 to 1.99.1, it behaved as expected, without modifying the nodes.

In the meantime, I had created APIs in Python and was performing the updates via HTTP requests.

1 Like

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