Using GitHub Actions to Send Daily WeChat Template Messages for a Personal Morning Reminder
This tutorial shows how to create a free, automated daily WeChat public account push using a test account, custom template messages, and GitHub Actions scheduled workflows without any server costs.
This guide walks you through building a free daily WeChat public‑account push notification using a test account and GitHub Actions.
1. Apply for a WeChat public platform test account . Visit the sandbox login page and scan the QR code to log in:
申请地址:https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login
After logging in you will obtain a test appID and appsecret.
Follow the page to add the test account as a follower; the user’s nickname and USER_ID will appear in the user list.
2. Create a template message . Click “Add new test template” and define a template such as:
今天天气:{{ weather.DATA }}
湿度:{{ humidity.DATA }}
当前温度:{{ temperature.DATA }}
我们已经相恋 {{ love_days.DATA }} 天啦
距离你的生日还有:{{ birthday_left.DATA }} 天
{{ words.DATA }}
Submit the template to obtain a unique template ID.
3. Prepare the GitHub Actions scheduled task . Fork the repository 13812851221/-rxrw-daily_morning to your own account.
In your forked repo, go to Settings → Secrets → Actions and add the following secrets exactly as shown in the WeChat test account (appID, appsecret, template ID, etc.).
Repeat the process for each required secret; missing or malformed values will cause the workflow to fail (error 41004 indicates a missing appsecret).
4. Enable and run the Action . Open the Actions tab in your repository, enable the workflow, and trigger a run.
The workflow will execute at the scheduled time (default 08:00 AM) and send the template message to the test account. A successful run shows a “completed” status after a short wait.
Check the recipient’s phone to confirm the push has arrived. You can customize the template content or schedule as needed.
php中文网 Courses
php中文网's platform for the latest courses and technical articles, helping PHP learners advance quickly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.