Powerautomate teams メッセージ取得 返信

Powerautomate teams メッセージ取得 返信

posted at 2022-08-31

背景

Teams の Message Details (メッセージの詳細)を取得する際

  • 返信したいメッセージID

ではなく、

  • 返信したいメッセージIDの親のメッセージID(スレッドの最初の投稿メッセージID)

が必要です。

以前は 親のメッセージID (Parent Message ID) を取得することが出来なかったはずなんだけど、いつの間にか出来るようになってましたってお話

Get Message Details
【日本語版】⇒ メッセージ詳細を取得する

以下で指定する ID です

Powerautomate teams メッセージ取得 返信

取れるもの

元々困っていた、For a selected message トリガーと、取得アクション自体での結果を例示

Parent Message ID という名前ではなく、Reply To ID で存在。

トリガー: For a selected message

For a selected message (V2)
【日本語版】⇒ 選択されたメッセージに対して (V2)

Parent Message ID の取得

@{triggerBody()?['teamsFlowRunContext']?['messagePayload']?['replyToId']}

Powerautomate teams メッセージ取得 返信

アクション: Get Message Details 自身からも取得出来ます

Get Message Details
【日本語版】⇒ メッセージ詳細を取得する

Parent Message ID の取得

@{outputs('Get_message_details')?['body/replyToId']}@{triggerBody()?['teamsFlowRunContext']?['messagePayload']?['subject']}

Powerautomate teams メッセージ取得 返信

ドキュメント

以下記載なので、不明

Returns
The outputs of this operation are dynamic.

Powerautomate teams メッセージ取得 返信

Powerautomate teams メッセージ取得 返信

あとがき

これで、For a selected message を使って、スレッド内返信が出来るようになりました

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

What you can do with signing up