Automated Push Notifications with IFTTT

Preface

I previously published an article about RSS subscriptions for the school’s official website. With an RSS subscription URL, we can push RSS updates to our “RSS client” to read newly updated articles on the website. When I wrote that article, I only knew how to set up update notifications for the school’s official website on my own “RssBot” on Telegram. I couldn’t push them directly to WeChat, so now I’m writing an article that can achieve pushing to WeChat.

IFTTT result preview
IFTTT result preview

Getting the RSS Subscription URL

💡 First, we need to be clear that not every website provides RSS subscriptions. Only some websites provide RSS. For websites without RSS subscriptions, you can only create the feed yourself or find an RSS feed created by others. Here I recommend a feed-sharing website: RssHub Author: DIYgod

I will use our school’s subscription as a demonstration:

HTML
1. 在RssHub中中找到我们学校的订阅地址: #路径:路由-大学通知-浙江工业大学
https://docs.rsshub.app/routes/zjut
2.根据需要修改参数,这里我们需要公告栏(板块ID:1)的通知更新,因此我们的订阅链接为:
https://rsshub.app/zjut/1
#如果需要每周会议的RSS订阅地址,那么将1改成2,即:https://rsshub.app/zjut/2

The first step is complete. The RSS feed URL we obtained is: https://rsshub.app/zjut/1

Push School Notification Updates to Email

IFTTT is the abbreviation of “if this then that.” Simply put, it means if this happens, then that happens. If this operation is completed, it will automatically complete that operation. For example: a teacup is placed under a water dispenser, and the water dispenser detects the teacup — this is this. The water flows down by itself and fills the teacup. This is that. If a teacup is detected, the water dispenser releases water.

IFTTT create your own applet screen
IFTTT create your own applet screen
IFTTT RSS Feed service card
IFTTT RSS Feed service card
IFTTT applet with an RSS trigger
IFTTT applet with an RSS trigger
IFTTT email action fields
IFTTT email action fields

💡 This implements pushing official website notification updates to your email. Due to website-related reasons, there may be a delay of more than ten minutes, so please understand.


Push to WeChat

Pushing to WeChat is slightly more difficult. If you want to configure it yourself, you can continue reading. If you don’t want to configure it yourself, you can scan the QR code below to follow the official account and receive update notifications from the school’s official website. Notifications from college websites will be added later.

QR code for following the WxPusher channel
QR code for following the WxPusher channel

Pushing RSS updates to WeChat uses WxPusher and IFTTT. The function is implemented together with Webhook.

WxPusher (WeChat push service) is a real-time information push platform that uses a WeChat official account as the channel. You can push information to WeChat by calling the API, without installing any additional software, enabling real-time information notifications. You can use WxPusher for server alarm notifications, course enrollment notifications, ticket-snatching notifications, information update reminders, and more.

1. Click the address, scan with WeChat to follow, and log in to the WxPusher backend

2. First create an application, and remember to save the APP_TOKEN.

WxPusher create application dialog
WxPusher create application dialog
WxPusher application created screen
WxPusher application created screen
HTML
APP_TOKEN:AT_iFym3l0dClijYPJk16AMjcjfPcazj8Ne
#每个人获取到的APP_TOKEN都不一样,请勿复制我的

3. Create a topic.

WxPusher create topic dialog
WxPusher create topic dialog

Remember the topic ID you just created.

WxPusher topic list with the topic ID highlighted
WxPusher topic list with the topic ID highlighted

4. Click Follow. A QR code will appear. Scan the QR code with WeChat to follow the topic.

WxPusher topic follow dialog with a QR code and follow link
WxPusher topic follow dialog with a QR code and follow link

5. Test whether the function works properly through the GET interface.

HTML
http://wxpusher.zjiecode.com/api/send/message/?appToken=AT_iFym3l0dClijYPJk16AMjcjfPcazj8Ne&content=Zero测试&topicId=608&url=https://example.com
请求参数:appToken、uid、topicId、content、url ,其中 content 和 url 请进行
urlEncode 编码。
HTML
appToken:AT_iFym3l0dClijYPJk16AMjcjfPcazj8Ne topicId:608 #即主题ID

Modify the address above according to your appToken and topicId. Fill in the push content after Content=, and if url is not needed, you can choose to delete &url=https://example.com.

After modification, paste the address into the browser address bar.

Browser response from the WxPusher GET message API
Browser response from the WxPusher GET message API

If it fails, there will also be a prompt indicating where the error is. Just modify it according to the prompt. At this point, if nothing goes wrong, your WeChat should receive the message you just sent.

WeChat message received from WxPusher
WeChat message received from WxPusher

At this point, the WxPusher section is configured.


6. Create a new IFTTT project. For the this part, still choose RSS. For details, please refer to the section on pushing from IFTTT to email.

IFTTT Webhooks service card
IFTTT Webhooks service card

For the that part, select Webhooks and configure it as shown in the image.

IFTTT Webhooks action fields for a WxPusher POST request
IFTTT Webhooks action fields for a WxPusher POST request
HTML
http://wxpusher.zjiecode.com/api/send/message #URL POST #Method application/json
#Content Type

Modify the Body section according to your actual situation and parameters. For complete parameters, click to view: Complete POST Usage

This is how I configured it:

JSON
{
  "appToken": "AT_iFym3l0dClijYPJk16AMjcjfPcazj8Ne",
  "content": "浙江工业大学: {{EntryTitle}}",
  "contentType": 1,
  "topicIds": [608],
  "url": "{{EntryUrl}}"
}

Two parameters are used here: {{EntryTitle}} and {{EntryUrl}}. Through these two parameters, IFTTT can obtain the title and link of the new notification from RSS, ultimately enabling push notifications of school official website updates to WeChat.

Through IFTTT as the medium, we can not only push RSS updates to WeChat, but also push notifications to DingTalk and a series of other software that provides Webhook functionality.