Simple MongoDB find by _id? [GOT CREATED]

Ok so perhaps I’m overlooking something really simple, or perhaps it’s unsupported at this time. I’ve done the work elsewhere to find an _id of interest, and now I would like to fetch the document and start operating on the data.

I have tried what I believe to be every permutation of quoting & nomenclature on the ‘find’ query for MongoDB but am unable to return the record of interest. I’ve reviewed the actual node definition and see the passthrough nature of the query section, but I can’t call the ‘ObjectID’ function of the module which mongo seems to require.

Example Expression:
{"_id":“ObjectId(‘5a17224770a39f0024481dab’)”}

So my question: Is it at all possible within N8N to directly look-up a mongodb record using it’s key?
Thanks in Advance.

Welcome to the community @jtolly

Sadly that is currently not possible. The _id property should be parsed to an ObjectID. Just made this post a feature request.

1 Like

A date for this feature? That would be insane!

Did just get added. With the next version it converts the string that is set as _id to an ObjectID. Will update here once it got released (probably tomorrow).

1 Like

Got released with [email protected]