MongoDB write node returns an id?

I’ve added a MongoDB write node to my workflow, and I want to send back the “id” generated by MongoDB for the thing I’ve just written. I can only see an ‘errors’ output port from the MongoDB write node. How can I get this node to give me the “id” of the object it’s just written to the collection?

At this stage, the ID of the inserted document is not returned, but we may add this functionality in the next version of the MongoDB plugin. In the meantime, you can replace the MongoDB record ID with your own IDs, as shown below.
Override MongoDB ids

1 Like

I love how you can just magic up a quick and dirty Hackeet example to show me how to do stuff :joy:

This is cool, so we can use the ‘uuid()’ function to generate our own unique ids and either overwrite the MongoDB “_id” field, or (as I’m going to do) just make your own field called “UniqueId” or something (my Bubble brainwashing there).

I guess this is one of the arguments for using MongoDB instead of an SQL type database: you can just write the table objects whatever way you want, Mongo doesn’t care!