| 1 |
# WeCom |
| 2 |
|
| 3 |
Send notifications to WeChat Work (Enterprise WeChat) using webhook bots. |
| 4 |
|
| 5 |
## URL Format |
| 6 |
|
| 7 |
!!! info "" |
| 8 |
wecom://__`key`__ |
| 9 |
|
| 10 |
--8<-- "docs/services/chat/wecom/config.md" |
| 11 |
|
| 12 |
- `key`: The webhook key from your WeChat Work bot (required). |
| 13 |
|
| 14 |
### Example URL |
| 15 |
|
| 16 |
```url |
| 17 |
wecom://693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa |
| 18 |
``` |
| 19 |
|
| 20 |
## Create a Webhook Bot in WeChat Work |
| 21 |
|
| 22 |
Official Documentation: [Webhook Bot Guide](https://developer.work.weixin.qq.com/document/path/99110) |
| 23 |
|
| 24 |
1. __Create a Group Bot__: |
| 25 |
a. Open WeChat Work on PC or Web. |
| 26 |
b. Find the target group for receiving notifications. |
| 27 |
c. Right-click the group and select "Add Group Bot". |
| 28 |
d. In the dialog, click "Create a Bot". |
| 29 |
e. Enter a custom bot name and click "Add". |
| 30 |
f. You will receive a webhook URL. |
| 31 |
|
| 32 |
2. __Get the Webhook Key__: |
| 33 |
- The webhook URL will look like: `https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXXXXXXXXXXXXXX` |
| 34 |
- The `key` is the value after `?key=` in the URL. |
| 35 |
|
| 36 |
3. __Configure Shoutrrr__: |
| 37 |
- Use the key in the Shoutrrr URL: `wecom://YOUR_WEBHOOK_KEY` |
| 38 |
|
| 39 |
### Message Features |
| 40 |
|
| 41 |
- Supports text messages up to 4096 characters |
| 42 |
- Can mention users with `mentioned_list` parameter |
| 43 |
- Can mention users by mobile number with `mentioned_mobile_list` parameter |
| 44 |
|
| 45 |
### Example with Mentions |
| 46 |
|
| 47 |
```bash |
| 48 |
shoutrrr send "wecom://693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa" "Alert message" --mentioned_list "@all" |