I am unable to update the data in the mongodb can you please assist me?
(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:**1.81.4
- **Database (default: SQLite):**Mon
godb
- Running n8n via (Docker, npm, n8n cloud, desktop app): self hosting
- **Operating system:**windows
This is how you can do it:
Basically, you should make sure your node connected as an input to MongoDB node returns the data that you wish to update along with the identifier (usually Id) to use to find the document.
In my example, I have a field name _id which has the id of each item. I am using n8n to find the document using that id and then return add the field (storeLocation) that I wish to update.