Python,Slack

Thumbnail of post image 143

Incoming Webhookをチャンネルにインストールし、TOKENとCHANNEL IDを取得していることが前提条件。

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Python,Slack

Thumbnail of post image 138

Incoming Webhookをチャンネルにインストールし、TOKENとCHANNEL IDを取得していることが前提条件。

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Slack

Thumbnail of post image 131

チャンネルを右クリックし、Copy linkをクリック。

すると以下のようなリンクを取得できる。

このリンクの末尾の記号がチャンネルIDである。

Python,Slack

Thumbnail of post image 132

import slackwebslack = slackweb.Slack(url="Webhook URL")slack.notify(text="This is message for you.")

参照