title: How to get new message detailes via Gmail push notifications?
body: <p>I have java server application. And I need to monitor a lot of gmail accounts to be able to send push notifications to mobile devices about new Inbox messages.
  I need to know sender email and message subject to send push notification.</p>
  
  <p>And I tried <a href="https://developers.google.com/gmail/api/guides/push" rel="nofollow">Gmail push notifications</a> system (webhooks option)
  If I understood everything correctly in order to get needed info for each new message for each user there is a following scenario:</p>
  
  <ul>
  <li>Google sends me <strong>email</strong> and <strong>history id</strong> via https request.</li>
  <li>I call <a href="https://developers.google.com/gmail/api/v1/reference/users/history/list" rel="nofollow">history API</a> and get new message ids for user</li>
  <li>I <a href="https://developers.google.com/gmail/api/v1/reference/users/messages#resource-representations" rel="nofollow">request message info</a> by message id</li>
  </ul>
  
  <p>That means that I need 2 additional requests for each new message of each user. And it looks quite hard if server needs to handle several new messages each second. And I still don't see other way.</p>
  
  <p>Is there any way to make it shorter? (e.g. to make google send me not only history id but needed new message details or at least make one additional request, but not two)</p>
  
  <p>Thanks!</p>