Google announced yesterday their GMail API. With this API, you can access the user's emails, drafts, attachments etc, as always under OAuth access control.

I've written a small demo of a Chrome extension that converts your emails to PDF, and creates a new draft with the PDF in attachment. It uses the chrome.identity api to retrieve the OAuth token.

It is an alpha version, with a lot of bugs. I need to improve the reading of the mails and the parsing of the gmail URL, as well as the global look. But it is still satisfying.

Here's a video of the extension in action.

And here's the github repo with the source code :