Unable to update Data in Mongo DB

Unable to update data in Mongo Db

this is a part of my workflow. I want to update 3 fields in my exixting document. I am filtering documents using _id and in the fields box i have tried all expressions to update the data. unfortuunately nothing is working here. (eg, sent:true, “Sent”:true, sent=true …)

It’s not updating the existing field, but it is inserting new fields and storing the value as null (eg, “sent: true“ : null)

Please share your workflow

NA

Share the output returned by the last node

Information on your n8n setup

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

Hey @Ansh_Gera hope all is good. Welcome to the community.

This is not how you update the document. Take a look at the following example.

The document before changes:

the WF:

The document after:

1 Like

@jabbson Thank you so much. it worked :+1:

Perfect. Kindly mark my answer as solution then. Thanks!

Cheers!

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