通过企业微信群机器人 发送群消息

1、添加群机器人,复制的webhook地址

2、

public static void main(String[] args) {

String reqUrl = "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=6xdexxxxxxxxxxxxxxxxxxxxxxxxxxx";

String title = "填写日志提醒";

String dateTime = DateUtil.formatDateTime(new Date());

String content = "记得写日志哟";

String reqJson = "{\n" +

" \"markdown\": {\n" +

" \"content\": \"> " +

"告警通知:<font color=\\\"info\\\">"+title+"</font>\\n> " +

"告警时间:<font color=\\\"info\\\">"+dateTime+"</font>\\n> " +

"告警原因:<font color=\\\"warning\\\">"+content+"</font>\"\n" +

" },\n" +

" \"msgtype\": \"markdown\"\n" +

"}";

String body = cn.hutool.http.HttpRequest.post(reqUrl).body(reqJson).timeout(5000).execute().body();

System.out.println("请求结果:\n"+body);

}

3、效果

相关推荐
A_QXBlms1 天前
突破企微群发天花板!企销宝异步RPA实现0.1秒无限次群发
企业微信·rpa
金融Tech趋势派2 天前
2026企业微信AI服务商实测:微盛·企微管家领跑私域客户运营赛道
大数据·人工智能·企业微信
weikecms2 天前
外卖霸王餐API接口对接
大数据·人工智能·企业微信·微客云
a752066282 天前
OpenClaw 对接企业微信机器人 完整图文配置落地教程
机器人·企业微信·openclaw·ai 办公自动化
学Linux的语莫2 天前
企业微信开发文档---企业微信机器人长连接开发
企业微信
企微增长观察2 天前
2026企业微信AI SCRM实测:微盛·企微管家全行业私域运营
大数据·人工智能·企业微信
Gerardisite3 天前
企微批量群发消息指南:用 QiWe 省掉人工操作
java·python·机器人·企业微信
噗噗123 天前
如何利用 QiweAPI 快速构建企业微信自动化助手?
运维·自动化·企业微信
2601_955781983 天前
企业微信智能助手一键对接方案
人工智能·企业微信·open claw安装
噗噗125 天前
多实例并发管理:如何利用 Node.js 构建万级企微账号调度系统
企业微信