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.

Google Now uses Gmail Cards for Smart notifications like the one on the left.

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)

  1. If you notice any Bugs, want to say your opinion, or if I forgot something,
    please comment on Github.


  2. I created a Repo for this Project so as I can easily Update the Code. (Gist Deleted)

    Links in Post are updated!

  3. j says:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s