I have been asked by friends why my Weread2Notion-Pro does not sync. This is because Github Actions are not always executed on time and may be delayed for a few hours. Today, I will share with you how to use shortcuts to trigger Github Actions on time and achieve tasks such as disabling WeChat Reading sync notes.
Step 1: Get the shortcut#
Open the link to get the shortcut: https://www.icloud.com/shortcuts/6282dd771f8849ffb8816ebc7d001155
Step 2: Fill in the values#
Open the shortcut you obtained and you will see that you need to fill in 3 values here.
"Name" is your Github username, "repository" is the name of your repository. For example, if the repository address of my weread2notion-pro is: https://github.com/malinkang/weread2notion-pro, then I would fill in "malinkang" for the name and "weread2notion-pro" for the repository.
The third value is the token, which is a bit more complicated to obtain.
- First, open the webpage: https://github.com/settings/apps, and follow the order of the icons in the figure below to enter the Token creation page.
- On the Token creation page, we need to fill in and select the following three values:
- "Note" is the note information, you can fill it in according to your personal situation.
- "Expiration" is the expiration time of the token. I chose "No expiration" so that the token will not expire.
- The third value is the scope of the token. Select "workflow" so that this token has the permission to trigger our Github Action.
After filling in, click "Generate token" at the bottom to create it.
After creation, you will be redirected to the Token list. Click the copy button to copy the token you created, and then fill it in the shortcut.
The final effect is shown in the figure below:
Now we can manually run this shortcut to trigger the Github Action.
Step 3: Automation settings#
Next, we can use automation settings to automatically disable WeChat Reading sync notes.
- Open the shortcuts on your phone, switch to the "Automation" tab in the middle, and click the "+" button in the upper right corner to create automation.
- Click "Create Personal Automation" and scroll down to find "App", then click to enter.
- Choose WeChat Reading for the app, select "Has been closed", and click "Next" in the upper right corner.
- Click "Add Action", search for "Shortcut", and then select "Open Shortcut".
- Click "Shortcut" and select the shortcut we obtained in the first step.
- Finally, click "Next" and then turn off "Ask Before Running". If you don't turn it off, a dialog box will pop up every time this automation is run, asking if you want to run it. After turning it off, the automation can run smoothly without interruption.
After this, we can automatically trigger note synchronization when WeChat Reading is closed.
Similarly, we can also achieve the following operations:
-
Trigger Douban2Notion sync when Douban is closed.
-
Trigger Toggle2Notion sync when Toggl is closed.
-
Trigger Duolingo2Notion sync when Duolingo is closed.
-
Trigger Keep2Notion sync when Keep is closed.
-
...
There are many triggering conditions for shortcuts, and you can also synchronize at a fixed time. You can explore it yourself.
In addition, I mentioned before that Github Actions have a limit of 2000 minutes per month, but later I found out that it only applies to private repositories. There is no limit for public repositories, so we can increase the frequency of synchronization without worrying about running out of quota.
If you find this article helpful, please consider donating to support it.