如何通过通过钉钉发送信息????????

1、通过钉钉群添加一个机器人

2、代码实现

java 复制代码
 /**
     * 发钉钉审核.
     *
     * @param
     */
    private void sendDingDing(String tableName) {
        String url = "https://oapi.dingtalk.com/robot/send?access_token=229c627d05a3157f79a5ef1942d29c4dfb4515bf5c0ad65e3c69423bc016f97c";
        JSONObject msg = new JSONObject();
        msg.set("at", new JSONObject().set("isAtAll", true));
        msg.set("text", new JSONObject().set("content", "采购单:拦截器启动成功!!!"));
        msg.set("msgtype", "text");
        String json = JSONUtil.toJsonStr(msg);
        String result = HttpRequest.post(url)
                .body(json)
                .execute().body();
        log.debug("采购单{},发送邮件审核成功", tableName);
    }

可以参考阿里的api:自定义机器人发送消息的消息类型 - 钉钉开放平台如果你需要了解自定义机器人的消息类型和数据格式,你可以参考本文档下方内容。https://open.dingtalk.com/document/orgapp/custom-bot-send-message-type

相关推荐
新老农2 天前
php数据导出pdf,然后pdf转图片,再推送钉钉群
pdf·php·钉钉
z日火2 天前
集成钉钉消息推送功能
钉钉·消息推送
xiaogai_gai5 天前
高效管理钉钉收款单数据集成到MySQL的技术方案
android·mysql·钉钉
邹卓为1 个月前
Jenkins 发送钉钉消息
运维·jenkins·钉钉
在荒野的梦想1 个月前
若依微服务集成Flowable仿钉钉工作流
spring cloud·微服务·钉钉
薄荷你玩_1 个月前
[Python] 企业内部应用接入钉钉登录,端内免登录+浏览器授权登录
开发语言·python·钉钉
生活百般滋味,人生需要笑对。 --佚名2 个月前
springboot对接OK交易所实现发送钉钉通知
spring boot·后端·钉钉
走,带你去玩2 个月前
uniapp运行到支付宝开发者工具
uni-app·钉钉
dragonchow1232 个月前
钉钉机器人
机器人·钉钉