Trigger fired function receives empty context.services with CREATE_COLLECTION event

Hi @Ben_Soille ,

By itself, context.services has no intrinsic value, you can only call its get interface, it will always look like from inside the Function as {}

  • What’s your exact context.services.get("<service>") command?
  • Does the name match the Service Name you’ve set in the Data Sources?
  • Are you observing the whole database, not just one collection?
  • Can you post a sample of a create change event?

You cannot do that, because the internal engine that runs the Functions (and thus in turn Triggers) has already its version of a MongoDB Driver: it may have limitations (on purpose), but you cannot override it. If you need to work with the full capability of a MongoDB Driver, than you have to launch a process somewhere else, and use db.watch() instead of relying on Triggers.