gmail api - Getting history events for just new messages? -
I want to monitor a user's Gmail account for new messages and take the appropriate action. Is there a way to bring events in history just for a new message, but not for things like changing e-mail or its labels etc?
So I ended up using messages.list and stored the timestamp of the most recent message. Then on subsequent calls to messages.list, I supply a query of "after: theMostRecentTimestampIKnowOf", to find new messages since the last time we synced.
Comments
Post a Comment