I use Google business some of the apps interact with gmail. When you open a email under in the footer of that email you get a information box of the app, then it can get data of that email and put it in a system..
Start mail.google.com --> get email and open --> go to the box under the email --> do something in the box with the data of that email..
How to build the same app functions but for our self, doe i need Google app engine or do i need Google apps script. Some links would be helpful
gr.