LoginSignup
5
7

More than 5 years have passed since last update.

CentOS7.3 環境(Vagrant)に Mattermost いれたので bot から Mattermost にタイムラインしてみる(Incoming WebHooks) その2

Posted at

あ、これがやりたかった

bot から Mattermost にタイムライン送ってみる方法、これやりたかった。
意外と簡単にできてびっくり。

SlackクローンのMattermostを使ってみる - 外部連携編 -(WebHooks、Hubot)

設定これだけ?

超かんたんw

botの定義(内向きウェブフック)

内向きウェブフックを選択して。

image.png

編集で対象のチャネルを選択して保存。

image.png

URLが払い出されるのでそれをメモして
image.png

とりあえずの動作確認

curl で叩いてみる。

curl -i -X POST -d 'payload={"icon_url": "/static/emoji/1f697.png", "username": "echo", "text": "今日は\nいい天気"}' http://192.168.1.128:19191/hooks/3p9ko4zkoifk8gtkyztcaqhm4a

image.png

きたー!!!

パラメータも対した事ないし、色々とできそうな感じ。
https://docs.mattermost.com/developer/webhooks-outgoing.html#slack-compatibility

5
7
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
5
7