# Huginn接入 Server酱：监控网页更新推微信（2026 教程）

> Huginn通过Post Agent发送Webhook接入Server酱，实现网页更新、RSS变动等事件自动推送到微信，含详细配置步骤。

- 网页版：https://sct.ftqq.com/docs/integrations/huginn/
- 更新日期：2026-07-17

# Huginn + Server酱：监控网页更新推微信

> 效果：Huginn 抓取到网页更新或 RSS 变动时，自动在微信收到通知

## 前置条件

- 获取 Server酱 SendKey（[30 秒获取教程](https://sct.ftqq.com/docs/getting-started/sendkey/)），SendKey 是推送凭证，妥善保管不要公开分享
- 运行中的 Huginn 实例，且已配置好上游 Agent（如 Website Agent 或 RSS Agent）

## 配置步骤

在 Huginn 中新建一个 Post Agent，按以下步骤配置：

1. **填写请求地址**

   在 `post_url` 中填入 Server酱 API 地址：

   ```yaml
   post_url: https://sctapi.ftqq.com/你的SENDKEY.send
   ```

   如果使用 Server酱³（SendKey 以 `sctp` 开头），端点改为 `https://你的UID.push.ft07.com/send/你的SENDKEY.send`，其中 UID 是 sctp 后的数字。

2. **设置请求方式与格式**

   ```yaml
   method: post
   content_type: form
   ```

3. **构造推送内容**

   在 `payload` 中，使用 Liquid 模板引用上游 Agent 产生的事件字段：

   ```yaml
   payload:
     title: "{{ title }}"
     desp: "{{ body }}"
   ```

   `title` 和 `desp` 对应 Server酱 的标题与正文参数，具体字段名以上游 Agent 输出为准。

4. **建立 Agent 链路**

   将此 Post Agent 连接在 Website Agent 或 RSS Agent 之后，形成"监控到变化→微信通知"的链路。

## 完整示例

以下为 Post Agent 的完整配置示例，可直接参考修改：

```json
{
  "type": "Agents::PostAgent",
  "name": "Server酱推送",
  "options": {
    "post_url": "https://sctapi.ftqq.com/你的SENDKEY.send",
    "method": "post",
    "content_type": "form",
    "payload": {
      "title": "{{ title }}",
      "desp": "检测到更新：{{ url }}\n\n{{ body }}"
    }
  }
}
```

## 常见问题

**Huginn 推送提示额度不足？**

免费用户每日有 5 条发送额度，每分钟上限 50 条。订阅会员目前特价最低 3 元/月，一天最多可发 1000 条（[价格详情](https://sct.ftqq.com/subscribe)）。

**微信没有收到 Huginn 的通知？**

检查 Post Agent 的日志是否报错，确认 SendKey 是否正确。也可参考[常见问题与排查](https://sct.ftqq.com/docs/getting-started/faq/)。

**Liquid 模板变量解析失败？**

确保上游 Agent 的事件输出中包含你引用的字段名，可在上游 Agent 的事件日志中查看实际可用的字段。

## 相关集成

- [Uptime Kuma 宕机告警](https://sct.ftqq.com/docs/integrations/uptime-kuma/)
- [青龙面板任务通知](https://sct.ftqq.com/docs/integrations/qinglong/)
- [Python 脚本推送](https://sct.ftqq.com/docs/integrations/python/)


## 懒人方案：把这段话复制给你的 AI 助手

把下面这段文字原样粘贴给 Claude Code、Cursor 或任何 AI 编程助手，它就会替你完成 Server酱 的接入：

```text
请帮我把 Server酱 微信通知接入到我当前的项目/工具中：
1. API：POST https://sctapi.ftqq.com/{SendKey}.send，参数 title（必填，不能含换行）、desp（正文，支持 Markdown，可选）；成功时返回 JSON 的 code 为 0。
2. 如果我的 SendKey 以 sctp 开头，则改用 https://{uid}.push.ft07.com/send/{SendKey}.send，uid 是 SendKey 中 sctp 与 t 之间的数字。
3. SendKey 从环境变量 SERVERCHAN_SENDKEY 读取；如果没有，提醒我到 https://sct.ftqq.com 免费获取（每天 5 条额度）。
4. 安全要求：不要把 SendKey 硬编码进代码、不要打印到日志、不要提交到 git。
5. 频率约定：任务结束发 1 条结果摘要即可，批量任务合并成一条，不要每步都推。
请根据我当前的项目和场景直接写好代码/配置并验证。
```

