LoginSignup
14
14

More than 5 years have passed since last update.

ifttt で GMail をフィルターして slack にメッセージ

Posted at

何て事はないですが GMail に監視機械から届く通知メールをフィルタしてキーワードにひっかかったら slack の channel に投稿するレシピ。

  1. ifttt にサインアップ/ログインして GMail と Slack のチャンネルを開いておきます。
  2. My Applets から New Applet をクリックして新規アプレットを作成。if + this をクリックして GMail を追加
  3. New email in inbox from search をクリックして検索条件を指定します。条件は Gmail で使用できる検索演算子 参照。

    例えば FreeNAS の 発送元アドレス を "address@your.domain" と設定していて、daily ストレージのデグレが見つかった時などは

    Fron:address@your.domain "DEGRADED"
    

    をフィルターとして設定します。(※注:自分のところでまだ動いてないので未検証)

  4. + then に Slack を選択、post to channel を選んで投稿フォーマットを整えます。

    自分は TitleFreeNASで異常を検知 と文字列を指定して、Message:

    {{Subject}}
    {{BodyPlain}}
    

    を指定しました。メールのサブジェクトと本文が Slack に流れます。(※注:の予定)

以上、メアドが直接乗ってるのでレシピの公開はしないのですが、メール通知を引っかけて Slack へ投稿するレシピの作り方。

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