Query MongoDB collection by UUID

Hi @autom8, welcome to the community!

n8n does struggle a bit with non-string types in Mongo I am afraid :frowning:

For object IDs you can use $toObjectId as suggested here in many cases, though I am not aware of a way to do this for the datatype you have described.

The Mongo library used in n8n would require valid JSON though which is why it fails for values { “theField”: UUID(‘ac000000-0000-0000-0000-000000000000’) }. Seeing the UUID is a base64-encoded string what happens if you simply treat this value as a string and use it as such for your lookup?