Hi @Lokesh_Reddy1 and welcome to the MongoDB community!!
Dropping a collection using the Atlas triggers is not possible as of today. If I may suggest an alternative, you might achieve the same by implementing the drop command in the application, if it’s applicable to your use case.
Also,
If I understand correctly, if you have a lot of chats, you will also have a lot of collections. Although there is technically no limit to the number of collections in MongoDB, if there are too many, you might hit some hardware-related limitations. Is there a reason for this design in particular? Will it be possible to implement this using a variation of the bucket pattern instead?