Search code examples
gmailgmail-apigmail-imap

Gmail new email notification


I've been doing some research into how to get new email notification from gmail. From what I am reading it doesn't really seem to be possible.

Gmail API has no webhooks or anything that would allow to get new email notification. Also IMAP api doesn't seem to be able to, at least from what I'm reading, documentation is rather vague.

So, I guess I am asking is there a way to achieve receiving notification when new email arrives so we can process it when its received or is polling for new emails since last pol the only option.

I don't care in what language is potential library written that could make this possible.

Thanks in advance for any information!


Solution

  • Check out this.

    Gmail push notifications are now available and mean you don't need to poll anymore.

    https://developers.google.com/gmail/api/guides/push