Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
189 views
in Technique[技术] by (71.8m points)

Creating Google calendar events from Gmail

I like how my flight information directly pops up in my Google calendar (even if it's a bit scary) and I would like the same thing to happen when, e.g., I book train tickets. My first though was to make a Chrome extension which would parse my Gmail inbox for specifik strings and then create a calendar event if it found the right info.

But, when reading about the calendar API I realized that it would be more logical to use the Gmail API and get the data from the mail directly then to parse a web page for the information. Right?

Do you see any problems with this approach? Authorization, for example. And could I use my ordinary web server to store the code? (I'm a newbie when it comes to these things). Even better, could I store it on a personal Google Site?

tl;dr

Can I use Google's API:s to check my mails and create events if the mail contain the right data? And would there be any problems like authorization etc?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can use Gmail API to get users's emails and then parse those emails to generate Google Calendar Events using Google Calendar API. Your application will need to have access to both Gmail Emails and user's Calendar. Better, use Gmail Push notifications, so that you receive a notification as soon as an email gets dropped in your mailbox and then parse it to see, if you would like to create a calendar event for that email.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...