3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PythonでSlackに通知

Posted at

はじめに

メモ用の走り書きですが、、、

Incoming Webhookの設定

  1. slack incoming webhookにアクセス
    https://my.slack.com/services/new/incoming-webhook/

  2. チャンネルを選択し、"インテグレーションの追加"
    image.png

  3. Webhook URLをコピー
    api.png

  4. お好みで設定を実施して保存
    image.png

  5. 設定の修正は下記から
    https://slack.com/apps/manage/custom-integrations

コード

slackwebをインストールする

pip install slackweb

メッセージを送る

slack = slackweb.Slack(url="さっきのURL")
slack.notify(text="メッセージ")

iPhoneアプリからはこんな感じで届く
image.png

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?