1
0

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 5 years have passed since last update.

SlackApp 外部からチャネルに投稿する方法

Last updated at Posted at 2020-04-20

SlackApp 外部からチャネルに投稿する方法

※こちらは自分が忘れないようにするメモ書きです。

①以下のURLにアクセスする。
※「XXX」はSlackのワークスペースのアドレス

https://XXX.slack.com/apps/A0F7XDUAZ--incoming-webhook-?next_id=0

②以下画面の「Slackに追加」ボタンを押下する。
スクリーンショット 2020-04-21 0.36.15.png

③投稿したいチャンネルを選択し、「Incoming Webhook インテグレーションの追加」を押下する。
スクリーンショット 2020-04-21 0.37.00.png

④以下のURLをコピーする。
スクリーンショット 2020-04-21 0.55.17.png

⑤画面一番下の「設定を保存する」を押下する。
スクリーンショット 2020-04-21 1.01.26.png

⑥以下のコマンドを実行する。

curl -X POST --data-urlencode "payload={ \"text\": \"これは webhookbot という名のボットから #api に投稿されています。\"}" "④でコピーしたURL"

⑦Slackの指定したチャネルにメッセージが投稿される。
スクリーンショット 2020-04-21 1.44.52.png

▪️参考
https://qiita.com/namutaka/items/233a83100c94af033575
https://qiita.com/ik-fib/items/b4a502d173a22b3947a0

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?