Languages / 语言切换: English | 中文
Aggregate WeChat Official Accounts / websites into Notion:
- Auto-fetch (plug in WeWe RSS if you like)
- Rule-based scoring (competitions / events / negative blocks)
- Write to Events database & generate a daily brief (Daily Briefs)
- Runs twice every day at 14:30 / 19:30 (UTC+8) via GitHub Actions
Fits the all-in-one page: Sources / Events / Rules (inline databases) + Daily Briefs (child page).
- Rule scoring: supports
TRIGGERS_COMP / TRIGGERS_EVENT / NEGATIVE / MIN_SCORE … - De-dup: same
Linkwon’t be created twice - Daily brief:
📅 YYYY-MM-DD Competition/Event Brief - Reliability: retry with exponential backoff; fallback parsing when RSS fails
- Optional WeWe refresh:
wewerss-refresh.ymltriggers?update=true
Sources
Name(title)/FeedURL(url)/Enabled(checkbox)
Events
Name(title)/Type(select: Competition, Event)/Source(rich_text)Published(date)/Deadline(date)/Score(number)Link(url)/Summary(rich_text)
Rules
Name(title)/Key(select: TRIGGERS_COMP, TRIGGERS_EVENT, NEGATIVE, PRIZE, ORG_AUTH, ONLINE, AUDIENCE, MIN_SCORE)Pattern(rich_text)/Weight(number)/HardBlock(checkbox)/Enabled(checkbox)
Daily Briefs
- A parent page for generated briefs
All four objects must be shared to your Integration (Can edit).
NOTION_TOKEN– Notion internal integration token (secret_…)NOTION_SOURCES_DB– Sources database IDNOTION_DB_ID– Events database IDNOTION_RULES_DB– Rules database IDNOTION_DAILY_PARENT– Daily Briefs parent page ID
(Optional Repo Variables) TZ=Asia/Shanghai
(Optional for WeWe refresh) WEWE_BASE, WEWE_FEED_IDS
.
├─ src/
│ ├─ pipeline.py # Read Sources → score → write Events → build brief
│ ├─ fetch.py # RSS/Atom first; fallback to HTML parsing
│ ├─ rules.py # Rule compilation & scoring
│ ├─ notion_util.py # Notion API wrapper + retries
│ └─ config.py # Env loader
├─ requirements.txt
└─ .github/workflows/
├─ notion-pipeline.yml # Main pipeline (14:30 / 19:30 UTC+8)
└─ wewerss-refresh.yml # Optional: trigger WeWe `?update=true`
- Notion: create/verify the four objects (Sources/Events/Rules/Daily Briefs), then Share them to your Integration (Can edit).
- Sources: add a test row
Name=Sample,FeedURL=(RSS/Atom or web page),Enabled=✅- Prefer an
.atomgenerated by WeWe RSS; you may appendtitle_include/title_excludefilters to the URL.
- GitHub Secrets: fill in the 5 required items above.
- First run
- Actions →
notion-pipeline (UTC+8 14:30 / 19:30)→ Run workflow - (Optional)
wewerss-refresh→ Run workflow (needsWEWE_BASE)
- Actions →
After it finishes, you should see new items in Events, and a new brief page under Daily Briefs.
notion-pipeline.yml:30 6 * * *→ 14:30 UTC+830 11 * * *→ 19:30 UTC+8
- GitHub pauses cron if the repo is inactive for 60 days; any push or manual run will resume it.
- For a third time (e.g., 23:59 +8):
- Enable
wewerss-refresh.yml(setWEWE_BASE) to trigger WeWe at 15:59 UTC; or - Widen WeWe’s
CRON_EXPRESSION(may over-trigger; use with care).
- Enable
- No data inserted:
- Is the source Enabled and the FeedURL accessible?
- Is
MIN_SCOREtoo high? (try 2–3) - Does the Integration have Can edit permissions?
- Duplicates/noisy: raise
NEGATIVEweights and set HardBlock=✅; increaseMIN_SCORE; or usetitle_include/excludein the feed URL. - WeWe not updating: confirm
CRON_EXPRESSIONis applied (Redeploy), and try…/feeds/all.atom?update=true.
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export NOTION_TOKEN=secret_xxx
export NOTION_SOURCES_DB=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_DB_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_RULES_DB=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_DAILY_PARENT=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python -m src.pipeline- Never commit tokens/IDs; put them in GitHub Secrets only.
- To revoke: remove the Integration from Notion Connections or reset the token.
把微信公众号 / 网站等信息源汇总到 Notion:
- 自动抓取(可接入 WeWe RSS)
- 规则打分(竞赛 / 活动 / 负向屏蔽)
- 写入 Events 数据库 & 生成每日简报(Daily Briefs)
- 每天 UTC+8 的 14:30 / 19:30 自动运行(GitHub Actions)
适配一体化页面:Sources / Events / Rules(内联数据库)+ Daily Briefs(子页面)。
- 按规则打分:支持
TRIGGERS_COMP / TRIGGERS_EVENT / NEGATIVE / MIN_SCORE … - 去重写入:同一
Link不重复创建 - 自动简报:
📅 YYYY-MM-DD 竞赛/活动简报 - 稳定性:Notion API 指数退避重试;RSS 失败回落网页解析
- 可选 WeWe 刷新:配合
wewerss-refresh.yml定时触发?update=true
Sources
Name(title)/FeedURL(url)/Enabled(checkbox)
Events
Name(title)/Type(select:含 竞赛、活动)/Source(rich_text)Published(date)/Deadline(date)/Score(number)Link(url)/Summary(rich_text)
Rules
Name(title)/Key(select:TRIGGERS_COMP, TRIGGERS_EVENT, NEGATIVE, PRIZE, ORG_AUTH, ONLINE, AUDIENCE, MIN_SCORE)Pattern(rich_text)/Weight(number)/HardBlock(checkbox)/Enabled(checkbox)
Daily Briefs
- 子页面,作为简报父页面
以上四个对象需 Share → Add connections → 你的 Integration(Can edit)。
NOTION_TOKEN– Notion 内部集成 token(secret_…)NOTION_SOURCES_DB– Sources 数据库 IDNOTION_DB_ID– Events 数据库 IDNOTION_RULES_DB– Rules 数据库 IDNOTION_DAILY_PARENT– Daily Briefs 父页面 ID
(可选 Repo Variables) TZ=Asia/Shanghai
(可选,用于刷新 WeWe) WEWE_BASE、WEWE_FEED_IDS
.
├─ src/
│ ├─ pipeline.py # 读取 Sources → 评分 → 写入 Events → 生成简报
│ ├─ fetch.py # RSS/Atom 优先;失败回落页面解析
│ ├─ rules.py # 规则编译与打分
│ ├─ notion_util.py # Notion API 封装 + 重试
│ └─ config.py # 读取环境变量
├─ requirements.txt
└─ .github/workflows/
├─ notion-pipeline.yml # 主流程(14:30 / 19:30 UTC+8)
└─ wewerss-refresh.yml # 可选:触发 WeWe `?update=true`
- Notion:创建/确认四个对象(Sources/Events/Rules/Daily Briefs),字段如上;Share 给 Integration(Can edit)。
- Sources:新增一行测试源
Name=示例,FeedURL=(RSS/Atom 链接或网页),Enabled=✅- 推荐使用 WeWe RSS 生成的
.atom;可在 URL 上追加title_include/title_exclude过滤。
- GitHub Secrets:填好上面的 5 个必填项。
- 首次手动运行
- Actions →
notion-pipeline (UTC+8 14:30 / 19:30)→ Run workflow - (可选)
wewerss-refresh→ Run workflow(需先设置WEWE_BASE)
- Actions →
运行完成后,在 Events 可见新增条目,在 Daily Briefs 下可见当天简报。
notion-pipeline.yml:30 6 * * *→ 14:30 UTC+830 11 * * *→ 19:30 UTC+8
- GitHub 定时在仓库 60 天无活动时会暂停;任意 push 或手动 Run 恢复。
- 需要第三个时间点(如 23:59 +8):
- 打开
wewerss-refresh.yml(设置WEWE_BASE),在 15:59 UTC 触发 WeWe 刷新;或 - 将 WeWe 的
CRON_EXPRESSION配成更宽表达式(会多刷,谨慎)。
- 打开
- 无数据入库:
- Sources 是否勾 Enabled;FeedURL 是否可打开返回 XML
Rules的 MIN_SCORE 是否过高(先设 2–3 测试)- Integration 是否有 Can edit 权限
- 重复/噪音多:提升
NEGATIVE权重并设 HardBlock=✅;提高MIN_SCORE;或在 feed URL 加title_include/exclude - WeWe 不更新:确认 Zeabur 的
CRON_EXPRESSION已生效并 Redeploy;访问…/feeds/all.atom?update=true测试 200
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
export NOTION_TOKEN=secret_xxx
export NOTION_SOURCES_DB=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_DB_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_RULES_DB=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export NOTION_DAILY_PARENT=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
python -m src.pipeline- 切勿把
secret_…token / 数据库 ID 放到代码里;只放 GitHub Secrets。 - 撤销权限:在 Notion Connections 移除该 Integration 或在集成页面重置 token。