Aggregation Pipeline - Atlas

Hello,

Is there a way to trigger an aggregation pipeline when event is triggered in collection. We are so far successful in doing via triggers and functions option using Mongodb Atlas. Instead of that route, we want to try via compass aggregation pipeline, or can we use aggregation pipeline concept in Atlas - Triggers?

Thank you.