2
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.

「OK Google!」 で LINE WORKS にメッセージを送る

Posted at

Google Home や Android スマートフォンに話しかけて LINE WORKS のトークルームにメッセージを送ってみます。

IFTTT と PowerAutomate を使います。

PowerAutomate のフローを作る

PowerAutomate で [+作成] で [インスタント フロー] をクリック。
image.png

任意のフロー名を指定し、[HTTP 要求の受信時] をトリガーに指定し [作成] をクリック。
image.png

[サンプルのペイロードを使用してスキーマを生成する] をクリック。
image.png

以下の JSON を入力。

{
"accountId": "admin@example.com",
"roomId": "0123456",
"Message": "こんにちは"
}

image.png

LINE WORKS カスタム コネクタの [メッセージ送信] をアクションに指定する。

image.png
image.png

パラメータを指定します。
image.png

保存をクリックします。
image.png

URL を控えておきます。
image.png

IFTTT のアプレット作成

Google Assistant の [Say a phrase wtih a text ingredient] をトリガーに指定。
image.png
image.png

OK Google の後の音声コマンドや、完了後の Google Assistant の返事を指定します。この例では 「OK Google、営業部に送信」に続けて話す内容がテキストで送られます。

image.png

Webhooks の [Make a web request] をアクションに指定。
image.png
image.png

パラメータを指定します。
URL はフロー作成時に生成されたものを指定します。
Body には以下の JSON を用います。
トークルーム宛の場合は roomId を、メンバー宛の場合は accountId を使います。

image.png

完了です。
image.png

動作確認

Google Home や Android の Google Assistant に話しかけましょう。
「オーケーグーグル、営業部に送信、明日の会議はオンラインで実行」のように。

指定したトークルームやあて先にメッセージが送信されます。
image.png

2
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
2
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?