ifttt推送gmail新邮件提醒

作者:matrix 发布时间:2020 年 2 月 8 日 分类:零零星星

今天临时想用ifttt来发送新邮件提醒服务的推送,查了下才知道19年初google就取消了对ifttt的api调用。不过看到可以使用其他三方应用来解决这个问题。

目的:新gmail邮件->tg消息通知

需要Gmail,IFTTT,automate.io,Trello,telegram相关账户

后续两天使用发现automate.io的免费版配额调用次数只有250次,所以说下面的操作对于想使用免费版本的人来说,可行性很低

[Alert] Action Quota about to Expire

This is to notify you that your account has consumed 80% of the total Action quota (250) in the Free plan. As and when it crosses the limit, your Bots will be paused automatically.

Please upgrade your plan if you anticipate more usage within the current billing cycle.

方法

类似于ifttt的automate.io可以设置处理条件,自由度也更高,可以接收处理gmail邮件,但是没找到telegram私有频道的接收app。但是可以用trello来中转达到转发效果。

调用链形式:gmail->automate->Trello->ifttt->telegram

绑定授权的automate.io应用

设置automate.io,进入app界面 授权gmail和Trello应用。注意授权gmail时要选着权限更高的gmail app要不然没有权限读取邮件。

图片5117-ifttt推送gmail新邮件提醒

添加Trello相关List用于接收邮件

  • 在Trello中添加私有看板boards命名为gmail

    图片5118-ifttt推送gmail新邮件提醒

  • 进入gmail看板再添加一个列表List命名为新邮件提醒用来接收邮件

设置automate.io BOT

创建bot

  • 添加gmail触发器

    触发应用Trigger app选择绑定了的Gmail,操作应用Action app选择Trello。
    触发事件Event选择新New EmailLable为Gmail邮件的分类,我这里选择INBOX,也就是所有收件箱。还可以设置Search Filter达到关键字过滤的效果。

  • 添加Trello操作

    选择Add or Update a Card事件,Board和List选择Trello中创建好的名称,gmail和新邮件提醒。title中设置显示的标题[From Email] - [From Name] - [Subject],
    Description描述我这里写入邮件的url https://mail.google.com/mail/u/0/#inbox/[Message ID],方便tg中点击查看。
    其他还有时间,标签的配置都可以自定义。
    如果想要预览邮件内容的话再添加个Trello的Add a Comment操作。

    个人版本不能分享bot,可以参照下面图片配置:

    图片5120-ifttt推送gmail新邮件提醒

automate.io的配置自由度很高,甚至都有存在or不存在的逻辑判断,真的好方便。免费版应该有很多限制,不过足够个人使用了。
这里添加完成之后进行automate.io的BOT测试,发送个邮件,如果Trello的gmail看板中有邮件就算成功一半。

每次有新邮件,让系统自动添加Card到List就好了。邮件标题和email等基本信息作Card名,方便可读。

图片5119-ifttt推送gmail新邮件提醒

上面就是接收新邮件到Trello的List的效果

设置IFTTT

到这里完成最后一步的IFTTT设置就可以把Trello的新Card发送到TG私有频道。如果是第一次使用IFTTT的tg频道的话还需要去关联

  • 设置This为Trello,之后选择Card added to list事件触发

  • 选择看板board,默认个人私有看板是My Boards

  • List name填入新邮件提醒

  • 选择IFTTT的thatTarget chat 选择绑定的tg ifttt频道。

  • 之后再设置tg频道的message消息内容格式

    GMAIL新邮件提醒: <a href="{{Description}}">{{Title}}</a><br>
    <a href="{{CardURL}}">View on Trello</a>
    

实现接收gmail提醒的方式还有很多路径,类似于automate的还可以用Zapier

参考:

Gmail is being removed from IFTTT
byu/IronRectangle inifttt

https://if404.com/archives/2019/04/09/use-ifttt-gmail-dropbox-auto-push-ebook-to-kindle