Python implementation sends a message to notify the nail group

Use a nail robot scene

Nails nails robot is an advanced extension group, you can simply achieve third-party service information aggregated into the nail base, automatic synchronization information, common scenarios are as follows:

  1. Polymerization Github, Gitlab source code management and other services to achieve the source code update synchronization;

  2. Polymerization Trello, JIRA and other project coordination services to achieve synchronization of project information;

  3. Support Webhook custom access and achieve more possibilities, such as: operation and maintenance alarm, automated reporting of test results, live & work schedule (Daka go to work, from work to eat, fitness, reading, birthdays, anniversaries ...) reminder ;

Two get custom robots hook address

1. WebHook What is that?

WebHook is a web or HTTP callback to push API, is a way to provide real-time information to the APP or other application, by requesting the address WebHook POST, the message data transmission can be achieved. There are a lot of party systems various events Webhook way to provide access to out nails, such as GitHub, GitLab, JIRA, Travis and Trello and so on.

2. How to get nailed group custom robots webhook address

In the nail group settings -> groups robot -> Add Robot

0.png

Nails platform document: https: //ding-doc.dingtalk.com/doc#/serverapi3/iydd5h

Three nails python send notification instance group

1. Determine the type of message

Nails supported message types are text type, link type, markdown type, ActionCard type and FeedCard type.

2. Python code examples

Examples of this type of message to send text as an example, but other types of message format inconsistent data, similar to the usage, depending on the particular usage scenario, with reference to the development of the corresponding message type document format can be. 1) text message format nailing

1.png2) 2) Python code reference

2.png

Four summary

Nails robot, features easy to use, functional and easier to use!

Five others

About python to learn, share, exchange, I opened a micro-channel public number [small] python community , and interested friends can focus the next, welcome to join, build our own small circle, learning python together.


Guess you like

Origin blog.51cto.com/2681882/2427513