Hi Chris, thanks for the fast response. Yeah, I should have been more specific. I do not need specifics of the received email(s); I just want to use the arrival of new email to trigger a process in the local extension that does indeed make calls to the Gmail API. In my current version, this process gets called when the user opens the first Gmail tab/window, and periodically (every few minutes) thereafter while a signed-in Gmail tab remains open. This is fine, except in the case where the user receives a new email and immediately composes a response before the "chron" process runs (this has the potential to happen a lot, I would imagine), because I want the received content (specifically, the contents of a custom email header in the received message) to be available to my extension to inform its behavior as the user composes the response.
I'm not concerned about missing messages while the user is offline-- we'll pick them up when they reconnect. I might be a little concerned about open Gmail tabs on multiple devices (logged into the same account) performing redundant Gmail API calls... but I don't think the redundancy will be huge, and if it is, I have some ideas about how to fix that.
So, if there were an event that fires whenever the unread email counter changes, I would use it. I realize that it may seem like I'm saying "I want you to do some work so I don't have to" -- but I think that a new email event may actually be the best/simplest way. If there are enough InboxSDK users who would use it, would you consider adding it?
Thanks--
Michael
P.S. (I also think there could be use cases that don't involve triggering calls to the Gmail API.)