From d1afa8e0ad6887b66c9d85ba2599cc335851c9e4 Mon Sep 17 00:00:00 2001 From: gitea Date: Sun, 14 Jan 2024 11:08:24 +0800 Subject: [PATCH] [add] qiyeweixin bot for suqian --- update/chatbot_suqian.sh | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 update/chatbot_suqian.sh diff --git a/update/chatbot_suqian.sh b/update/chatbot_suqian.sh new file mode 100644 index 0000000..139e917 --- /dev/null +++ b/update/chatbot_suqian.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +function sendMsg() { + + # 个人测试 + # curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ddea3f5f-fbfc-4c21-994a-71e9fc50e4ef' \ + # -H 'Content-Type: application/json' \ + # -d ' + # { + # "msgtype": "markdown", + # "markdown": { + # "content": "**'"$alarmTitle"'**\n + # > '"$alarmInfo"'" + # } + # }' > /dev/null 2>&1 + + # 群hook + curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=924c62e3-1bb8-4d17-84b1-e543eb27ba1e' \ + -H 'Content-Type: application/json' \ + -d ' + { + "msgtype": "text", + "text": { + "content": "'"$alarmTitle"':\n'"$alarmInfo"'", + "mentioned_list":["@all"] + } + }' > /dev/null 2>&1 +} + + +isFriday=$(date +%A) +time_opt=$1 +alarmTitle="每日/周工作记录提醒" + +if [[ $isFriday == 'Friday' ]]; then + alarmInfo='周五了[庆祝][庆祝][庆祝],请各位及时填写周报,感谢大家本周的辛苦付出,别忘了还有今日工作内容安排记录,以及问题进展跟新~~~' +else + alarmInfo='大家记得写每日工作内容安排,上午10点之前写完,工作期间可以补充内容,下班前17点左右完善一下,争取日事日毕~[拳头][拳头][拳头]\n有事没事找找客户经理,发个信息啥的也可~~\n客户走访记录,问题解决以及客户经理需求记录,也要记得跟进更新闭环~~~' +fi + +sendMsg $alarmTitle $alarmInfo