I have used Gmail APIs with server less functions, using oAuth, you can get all emails recieved within a timeframe and can trigger a webhook if certain conditions are met.
Btw now this permission to read emails are very costly to setup after Gmail dev policy changes