Python,Slack

Thumbnail of post image 162

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

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Python,Slack

Thumbnail of post image 063

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

import requestsTOKEN = "xxxxxxxxxxxxxxxxxxx"CHANNEL ...

Slack

Thumbnail of post image 004

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

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

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

Python,Slack

Thumbnail of post image 198

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

参照