--- description: RaspberryPiのNode-REDで、http-requestを使って簡単にMattermostへの通知を試してみます。 image: https://i.gyazo.com/db734225d9b571a87d510efcc1d2980a.png tags: RaspberryPi, Node-RED lang: ja-jp --- # RaspberryPiでNode-RED http-request(Mattermost通知編) RaspberryPiのNode-REDで、http-requestを使って簡単にMattermostへの通知を試してみます。 ## とりあえず送信  - inject ペイロードをJSONに設定し、内容を、 ```json= { "text": "こんにちは\nNode-REDより" } ```  - http request メソッドをPOST URLは、Mattermostの内向きのウェブフックで取得したURL  デプロイして、injectのボタンを押すと、Mattermostにメッセージが送信される。  できた! ## まとめ http requestノードを使うと、簡単にウェブフックを簡単に呼び出せる。 1. ウェブフックに渡すjsonを、msg.payloadに設定 2. http requestノードに、```メソッド``` ```URL```を設定 今回は、Mattermostへの通知でしたが、Slackへの通知も同じようにすればできるはず。
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up