Triggers using Robo 3T

Hi All,
I want to know that is there is any way to create Triggers for MongoDB(local). I know that we can create Triggers for MongoDB Atlas which is a cloud service and here is the documentation link:
If we can create triggers via Robo 3T then how ?

~ Thanks in advance.

Hi Nabeel,

MongoDB Atlas Triggers are implemented in the Atlas service using the Change Streams feature of MongoDB Server.

You can implement similar functionality for your own application or API using Change Streams.


Thanks @Stennie for answering my question. Could you please be specific in Yes/No that is there is any way to write triggers in Robo 3T? We can write triggers for MongoDB Atlas only which is an cloud service, right?

Hi @Nabeel_Raza,

Triggers are not part of the core MongoDB Server functionality. Database Triggers are implemented using the Change Streams functionality to watch a deployment for relevant changes which are then passed to a function; Scheduled Triggers are also implemented in the Atlas service.

MongoDB Atlas includes an implementation that runs as part of the cloud service, but you can also implement similar behaviour in your own application or API for a self-hosted deployment.

The Yes/No interpretation for implementing triggers for a self-hosted deployment is:

  • Yes: if you write code in your application or API using Change Streams and/or a scheduling service. The triggers are configured and implemented outside of Robo 3T.

  • No: if you do not have an application or API and are trying to do this entirely in Robo 3T.


1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.