WeCom (企业微信)
WeCom group bots are the simplest channel to wire. There's no extra signing — the bot key in the webhook URL is the credential.
| Mode | Status |
|---|---|
| Notification | Supported. Group robot text push. |
| IM bridge | Not supported (WeCom bots don't carry inbound chat). |
Payload
WeCom's group bot accepts the same flat text shape as DingTalk:
{
"msgtype": "text",
"text": {"content": "[CRITICAL] node-01 swap_high\nswap_in_pages > 1000 for 5m\nsource: alert\ndedupe: alert:swap_high:device=7"}
}The body is built by the shared formatText helper used by Feishu and DingTalk. The sender is NewWeComSender.
No signing
The webhook URL has the form
https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=<bot-uuid>The key= query parameter is the bot identifier and the credential. Anyone who has the URL can post to the group. There is no separate secret, no HMAC, no timestamp. The sender ignores any value you put in the Secret field — same drop-on-construction policy as Slack.
Treat the URL like a password
Leaking the URL is equivalent to leaking the bot's posting rights. Rotate by deleting and re-adding the bot in the WeCom group (the key changes).
Setup
- In a WeCom group on desktop → 群机器人 → 添加机器人 → 添加 → 新建. Give it a name and avatar.
- WeCom shows you a Webhook 地址. Copy it whole — including the
?key=…query string. - In Ongrid: Settings → Channels → New → Provider =
wecom→ Endpoint = the URL from step 2. Leave Secret blank. - Click Test. The bot posts
[INFO] Ongrid testinto the group.
Quirks
One bot per group
Each WeCom group bot is scoped to one group. To deliver alerts to two groups, create two bots and two Ongrid channels. (DingTalk and Feishu also work this way; the abstraction the alert pipeline cares about is the channel, not the chat platform.)
mentioned_list is not in the payload
The sender ships pure text. Mentioning specific members (mentioned_list / mentioned_mobile_list) is not built today — reach for the generic webhook if you need it.
Message-frequency cap
WeCom caps group-robot messages at 20 messages per minute per bot. Burst above that and WeCom returns errcode: 45009 ("api freq out of limit"). The alert pipeline's per-rule dampening usually stays well under, but a noisy critical rule on a 100-host cluster can blow through it. Use multiple bots and route per-team if you have to.
China-only (mostly)
The qyapi.weixin.qq.com host is intended for mainland China deployments. For overseas teams Slack / Telegram / Larksuite are the better fit. WeCom for International (Tencent's overseas product) is a different API surface and is not wired today.
Comparison with the other Chinese chats
| Aspect | WeCom | Feishu | DingTalk |
|---|---|---|---|
| Authentication | URL key= only | sign in JSON body | sign in URL query |
| Signing algorithm | None | HMAC-SHA256 | HMAC-SHA256 |
| Setup steps | 2 (add bot, paste) | 4 (sign + secret) | 4 (sign + secret) |
| IM bridge support | No | Yes (long-conn) | Schema-only |
Start with WeCom if it's your first channel
Easiest to set up, hardest to misconfigure. If alerts don't land, 99% of the time it's because the bot was deleted from the group or the host can't reach qyapi.weixin.qq.com.
Related
- Channels overview
- Webhook — fallback for any chat surface Ongrid doesn't speak natively.