Enterprise wechat group robot message sending and management

Source address: https://github.com/crisschan/workwechatbot

Method of use

In botConfig, the callback address and alias of the robot are configured. After running webApp, the service will start at 8080. Access 127.0.0.1:8080 to access the robot configuration as follows:

    [{"botname":"bot","webhook":"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=b425177c-3eee-48c4-82a0-"}]Copy the code

Introduction to the

The web is encapsulated by flask, which can send messages of text, Markdown and wechat article types, providing the way of SENDING messages by UI, as well as interface access.

Interface specification

{"articletype" : "articletype, can specify text, markdown, and news, must be lowercase, where text is the text type message, markdown is the markdown type message, news is wechat article ", "phone" : "Want @ people marked by phone, if not need to pass @all parameter ", "robot":"webhook callback address ", "detail":" article details"}Copy the code

Among them, Robot webhook needs to establish a group in the enterprise wechat, then click the icon in the upper right corner, click group robot, after adding, you can see a Webook address, this parameter is the address. Detail: If articleType is text, this is a string; If articleType, then markdown text; If articleType is news, the detail should follow the following format:

{"title" : "blog", "description" :" blog", "url" : "https://blog.csdn.net/crisschan/article/details/100922668", "picurl" : Pay attention to me, "https://i.loli.net/2019/09/17/4wPgvOm72Q9zT8K.png"} on test FROM:https://blog.csdn.net/crisschan * * * *Copy the code