2

I am searching for a way to get notified in my Node.js Backend , Everytime when I get an email in my gmail inbox. So that I can show my sales team in frontend that they got a new mail from client. We have their mail read access and are able to fetch email from their inbox. But we are looking for a real time notification in frontend for new mails.

You can also suggest alternate ways if any.

Please Help!

  • 1
    Is this a gusite account? This would probably be the easiest way https://developers.google.com/gmail/api/guides/push Im not sure how real time it is though. – Linda Lawton - DaImTo Oct 01 '20 at 06:59

1 Answers1

0

This should help

  1. Turn on watching for message events: https://developers.google.com/gmail/api/v1/reference/users/watch
  2. When you get a new incoming messageId (messagesAdded history type) you ask for its information (in full format): https://developers.google.com/gmail/api/v1/reference/users/messages/get
r7r
  • 1,440
  • 1
  • 11
  • 19