RSS 订阅 Notion API Changelog

summary
Notion API Changelog 页面提供了 RSS 链接。可以添加到 Telegram 通知,或者配合 IFTTT 实现邮件提醒。
tags
Notion
API
date
Sep 10, 2021
Chinese version
English version
 
💡
从 notiondevs Slack 中了解到 Notion API Changelog 页面提供了 RSS,就是直接在地址后加 .rsshttps://developers.notion.com/changelog.rss 。可以添加到 Telegram 的通知,或者配合 IFTTT 实现邮件提醒。
在得知前,我用 Feed43 做了一个该页面的 RSS 链接。本文最后一部分是制作过程和链接,仅做教学用途,需要订阅 Changelog 的使用官方提供的 RSS 就好。

获取提醒

IFTTT + 邮箱

IFTTT 中定义如下 Applet:If New feed item, Then Send me an email
notion image
第一个里填 Feed URL,第二个可以做如下设置
notion image
随后在更新时就会收到邮件,点击下方的链接就可以跳转 Changelog 详情页

Telegram RSS bot

添加个 RSS bot 来获取更新提醒。很多选择,例如:
有其他好用的欢迎评论推荐~

Feed43 RSS 制作过程

💡
订阅地址是:https://feed43.com/notion-api-changelog.xml 。制作过程仅做教学用途,因为有延迟和水印。需要订阅 Changelog 的使用官方提供的 RSS 就好。
Feed43 加载 https://developers.notion.com/changelog,可以发现一段 Changelog 大概是如下的结构
<div class="changelog-post">
    <div id="changelog-type-icon" class="cl-improved"></div>
    <div id="changelog-type-text">improved</div>
    <div class="post-title">
        <h3><a ui-sref="changelog.show({changelog:'relation-and-rollup-properties-can-now-be-created-in-databases'})">Relation
                and rollup properties can now be created in databases</a></h3>
    </div>
    <div class="changelog-info">Posted by Kiran Pandit about 10 hours ago</div>
    <div ui-sref="changelog.show({changelog:'relation-and-rollup-properties-can-now-be-created-in-databases'})"
        class="changelog-preview">
        <section ng-non-bindable class="markdown-body">
            <p>When <a href="https://developers.notion.com/reference/create-a-database" target="" title="">creating</a>
                or <a href="https://developers.notion.com/reference/update-a-database" target="" title="">updating</a>
                databases, you can now add <code class="rdmd-code lang-" data-lang=""
                    name=""><button aria-label="Copy Code" class="rdmd-code-copy fa"></button>relation</code> and <code
                    class="rdmd-code lang-" data-lang=""
                    name=""><button aria-label="Copy Code" class="rdmd-code-copy fa"></button>rollup</code> property
                types. Note that the related database must also be shared with the integration.</p>
        </section>
    </div>
</div>
定义 Global Search Pattern 指定搜索范围,这里可以留空表示全局
定义 Item (repeatable) Search Pattern,其中 {%} 表示要提取的内容, {*} 代表有内容省略。再配合一些必定会出现的元素,我写的 Pattern 如下:
<div class="changelog-post">{*}
<h3><a {*}>{%}</a></h3></div>
<div class="changelog-info">{%}</div>
<div ui-sref="changelog.show({changelog:'{%}'})" class="changelog-preview">
<section ng-non-bindable class="markdown-body"><p>
{%}
</p>
</section>
</div>
</div>
notion image
点击 Extract 就可以获得页面内匹配的项,如图所示,匹配了:标题,作者和时间,slug,描述
notion image
定义输出格式:这个 Feed 以及每个 item 的格式。item 的链接我对 slug 进行了拼接,内容包含了作者时间和描述
notion image
点击 Preview 可以查看预览。获得的 Feed URL 命名为了 https://feed43.com/notion-api-changelog.xml
notion image

缺点和后续改进计划

部分 Changelog 带有标签,如 IMPROVED,ADDED。由于不是每个都有这部分的代码,因此无法加入匹配。另外 Feed43 的免费计划会显示 - Delivered by Feed43 service。或许之后会转用 RSSHub 等。

© Niin Ni 2021 - 2024