Let’s get away from the Hacky stuff for a moment. We have all seen Google Now with some great, innovative Features that could also be integrated to Artificial Intelligent Assistants like Siri.
And many people HAVE created such Assistants themselves. Including me.
Searching Google about how to use Notifications like Google Now was a Dead end. Especially when it came for the Gmail Cards.
So the idea was to Create that library myself, free and open source on Github, to access the Gmail Inbox and if there is any Gmail Card Available, convert it to Human-Readable Data.
Google provides some information on there Developers’ Website, about how these stuff works and how to Send an E-Mail with such a Card. However, as far as I know, only Google Now on iOS and Android are able to Access that data.
So, what this library does?
It fetches all the inbox messages from your Gmail account, and if there are any Gmail Cards, it converts the appropriate Data so it becomes easily Accessible and Editable. THEREFORE HUMAN-Readable.
After that, an Intelligent Assistant, for example, could use that data for Smart Notifications (like Google Now).
I hope you enjoy the Library, there is an Implementation in the Script to run as a Separate Script and a Python Module. So, all you need to modify is under the “if __name__ == ‘__main___’:” part.
Link to Github: https://github.com/akatzbreaker/Gmail-Cards-for-Python
More Information about Gmail Cards/Schemas:
https://developers.google.com/gmail/schemas/reference/index (Navigate from the Bottom-Left Dropdown at the Sidebar – Reference Guide)