2

for the following problem I need some advice on what would be the best to do:

I want to keep track on my emails so I wrote a small Python script which does exactly that. Since it is my GMail account I am looking at and I would like to store the data in a Google spreadsheet I thought about using the Google App Engine.

This script should be triggered everytime there is a new email in my post box. What would be the smartest way to do so considering any security issues?

steph
  • 555
  • 2
  • 6
  • 21
  • check out gmail api push notifications - https://developers.google.com/gmail/api/guides/push – Gwyn Howell Jun 10 '15 at 07:14
  • Uh that looks cool, I haven't found this so far! Thanks! – steph Jun 10 '15 at 07:24
  • But is it possible to run my script on Google's servers? All tutorials I have found so far look like web apps but I want my script running only in the background and process my data... – steph Jun 11 '15 at 08:39
  • of course! a web app is hosted on a server right? just because it's a "web app", doesn't mean it needs a "web page" - think about it. – Gwyn Howell Jun 11 '15 at 08:40
  • 2
    sorry, that was a bit of a cocky answer. basically, you can use app engine with the gmail push notification api. you can register a url to be called when an event you want to monitor happens.that will hit your registered url. you can then use the request handler to do some processing, or fire a task to do whatever work you need to do. you would also have access to the datastore etc if you wanted to save data for stats reporting or whatever. you don't need to respond to this request with anything other than a HTTP 200. And you don't need any client facing webpages to be served. Hope this helps! – Gwyn Howell Jun 11 '15 at 08:53
  • True, you're right. I guess I just got confused by all the tutorials and because I also just started with Google Developers ... – steph Jun 11 '15 at 08:54
  • @GwynHowell @ steph Hi! I have the same issue. So... could you clarify? What URL do I use? Does this involve that watch() keyword? Sorry if I'm being stupid. – Palbitt Aug 29 '20 at 02:06

0 Answers0