从Gmail创建Google日历活动 [英] Creating Google calendar events from Gmail

查看:227
本文介绍了从Gmail创建Google日历活动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢我的Google日历中直接弹出我的航班信息(即使有点可怕),并且我希望在预订火车票时也会发生同样的情况。我的第一个做法是制作一个Chrome扩展程序,它将解析我的Gmail收件箱中的特定字符串,然后创建日历事件(如果它找到正确的信息)。



但是,阅读关于日历API,我意识到使用Gmail API并直接从邮件中获取数据然后解析网页以获取信息会更符合逻辑。对吗?

你看到这种方法有什么问题吗?例如授权。我可以使用普通的Web服务器来存储代码吗? (当谈到这些事情时,我是一个新手)。更好的是,我可以将它存储在个人Google网站上吗?

tl; dr

如果邮件包含正确的数据,我可以使用Google的API检查我的邮件并创建活动吗?并且会不会有授权等问题?

解决方案

您可以使用Gmail API获取用户的电子邮件,然后将这些电子邮件解析为使用Google Calendar API生成Google日历事件。您的应用程序需要同时访问Gmail电子邮件和用户日历。更好的办法是,使用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?

解决方案

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.

这篇关于从Gmail创建Google日历活动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆