Problem in node mongoDB aggregation

i have this aggregate query and its working on my database query console
but when I run it on n8n it will return an empty collection

I think the problem is in line 4 when I want to create a new Date() it can not understand it with this n8n JSON syntax
can somebody help me?

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

hello @amir

Don’t know if that works, but try to pass the date object:

{ "$gt": {{ DateTime.fromISO('2024-07-05T18:35:28.349Z') }} }

and set the query mode to Expression

thank you for your help