Windows
 Computer >> コンピューター >  >> システム >> Windows

Power Automate を使用して Microsoft Teams のステータスを更新する方法

Microsoft Teams の状態を自動的に設定する機能は、勤務時間を分割するのに役立つため、自宅で仕事をしているときに PC に縛られていると感じることはありません。もちろん、いつでも Microsoft Teams にアクセスして自分のステータスを手動で変更できますが、アプリを開かずに Microsoft Teams のステータスを変更できる機能があればもっと良いと思いませんか?

Microsoft 365 向けに構築された Power Automate を使用すると、自動化によってタスクとワークフローが合理化され、時間を節約できます。ワークフローや「フロー」を作成または自動化したことがなくても心配する必要はありません。人気のあるアプリ テンプレートが多数用意されています。

ステータスを設定

このガイドは、Power Automate を介して Teams ステータス更新を実行する方法に関する投稿を作成した Microsoft MVP である Damien Bird によるガイドに基づいています。ダミアン・バードがガイドの最初に残した警告も繰り返します。

これは文書化されていない方法であり、使用しないでください 生産フローでは機能しますが、常にではありません。また、1 日に実行できるフローの数には制限があります。したがって、期待を抑えることが重要です。

Damien Bird の投稿に表示されるリンクは次のとおりです。

Power Automate で Microsoft Teams のステータスを設定するには、次のようにします。

1. Power Automate で、[マイ フロー] をクリックします。 左側のナビゲーション ペインから。
2. [新しいフロー] をクリックします .
3.ここでは、次の 3 つのオプションがあります。自動化されたクラウド フローインスタント クラウド フロー 、または スケジュールされたクラウド フロー .この例では、インスタント クラウド フローを使用します。 .
Power Automate を使用して Microsoft Teams のステータスを更新する方法4. フロー名を作成する [このフローをトリガーする方法を選択してください] の下のオプションをクリックします .この例では、フローを手動でトリガーするを使用します . [作成] をクリックします 確認が終わったら。 Power Automate を使用して Microsoft Teams のステータスを更新する方法
5. [作成] をクリックした後 、新しいフローが作成され、手動トリガーで開始されることがわかります。次のステップを選択する必要があります。[次のステップ] をクリックします。 .
Power Automate を使用して Microsoft Teams のステータスを更新する方法
6.検索ボックスで「SharePoint」を検索し、スクロールして [Send an HTTP request to SharePoint] をクリックします。 . Power Automate を使用して Microsoft Teams のステータスを更新する方法

Microsoft Teams のステータスを設定する

1. 次のメニューで、SharePoint への HTTP リクエストを完了する必要があります。 . SharePoint リクエストは、下の画像のようになります。
Power Automate を使用して Microsoft Teams のステータスを更新する方法
「可用性」を変更できます "Available" へのフロー本文のステータス 、「忙しい」「BeRightBack」「DoNotDisturb」 、または「離席中」 .オフライン/オフワークのオプションを機能させることができなかったため、このガイドには含めません。
2. [保存] をクリックします
3.次に、フローの準備が整ったので、テストする必要があります。テストすることをお勧めするだけでなく、最初のフローをセットアップするときにも必要です。 [テスト] をクリックします .
Power Automate を使用して Microsoft Teams のステータスを更新する方法
4.次の画面で、フローをテストする方法を指定する必要があります。手動 (あなたがトリガーします) または 自動的に (別のフローの以前の実行に基づく)。 手動を選択 、最初のフロー設定での唯一の選択肢。 [テスト] をクリックします 確認するために。 Power Automate を使用して Microsoft Teams のステータスを更新する方法
5.アクセス許可レベルによっては、Power Automate から Microsoft アカウントにサインインして、フローを機能させるためのアクセス許可を確認するように求められる場合があります。示されているように、緑色のチェック マークで示されているように、必要なアクセス許可を既に持っているので、準備ができています。 [続行] をクリックします .
Power Automate を使用して Microsoft Teams のステータスを更新する方法
6.最後に、[フローを実行] をクリックします。 フローを実行します。
Power Automate を使用して Microsoft Teams のステータスを更新する方法
実行をクリックしたら フローが正常に開始されたことを示す緑色のチェック マークと、[フロー実行] ページでフローのステータスを確認するためのリンクが表示されます。 Microsoft Teams のステータスをチェックして、フローを実行したときに変更されたかどうかを確認することもできます。

ステータス メッセージを設定する

ステータス メッセージを設定するには、いくつかの変更を除いて、上記とほぼ同じ別の Power Automate フローを作成する必要があります。フローは次のようになります。
Power Automate を使用して Microsoft Teams のステータスを更新する方法

Create a custom Microsoft Teams status connector

While looking up content for this guide, I came across a really cool Spotify project by another Microsoft MVP, Loryan Strant. It takes a Spotify custom connector with a thorough guide created by That API Guy and updates their Microsoft Teams status to show what song and artist they are listening to on Spotify.

After following along with his guide, I found that another Microsoft MVP, Luise Freese provided a more efficient solution for the flow. So, my end result is a combination of both of their combined work combined with trial and error. Their guides were missing important explanations of dynamic values and expressions and what they do, but their guides are not meant for new Power Automate users either. After following both their guides, I created a Spotify custom connector with Microsoft Teams that aligns more with Freese's solution, but if you have an even better solution, please share it.

If you are looking for an easier option, copy the code exactly as it appears below to either:
1. Set your Microsoft Teams status to Away
{"id":"6e453f83-f22d-4715-bdb6-5cbe7b44b6fa","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/5d9bafd92370456789caa39b6c3f2277"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/releases/v1.0.1554/1.0.1554.2707/sharepointonline/icon.png","isTrigger":false,"operationName":"Set_Microsoft_Teams_status_to_Away","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://presence.teams.microsoft.com","parameters/method":"PUT","parameters/uri":"/v1/me/forceavailability","parameters/headers":{"content-type":"application/json"},"parameters/body":"{\n\n\"availability\": “Offline”, \n\"activity\": “OffWork”\n\n}"},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{},"metadata":{"operationMetadataId":"e3433a3c-7e7c-40d5-b804-696b2b1d0398"}}}

2. Update your status message note
{"id":"638a81c6-7d9b-481a-8875-97a08dcf18b7","brandColor":"#036C70","connectionReferences":{"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/5d9bafd92370456789caa39b6c3f2277"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/releases/v1.0.1554/1.0.1554.2707/sharepointonline/icon.png","isTrigger":false,"operationName":"Set_Microsoft_Teams_status_message_note_","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"https://presence.teams.microsoft.com","parameters/method":"PUT","parameters/uri":"/v1/me/publishnote","parameters/headers":{"content-type":"application/json"},"parameters/body":"{\n\n\"message\": \"I am away from my desk. I went to grab lunch\"\n\n}\n "},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{},"metadata":{"operationMetadataId":"05f65dba-6bef-458a-81ac-b4fc08c290db"}}}

You can paste it straight into Power Automate by going to New step> My clipboard . Paste it directly to the clipboard when you set up your Power Automate account. Power Automate を使用して Microsoft Teams のステータスを更新する方法If you have any questions or need any help setting up this flow, have advice, or can give me input to make a better flow, please reach out to me on Twitter.


  1. Microsoft Teams で Power Virtual Agents チャットボットのトピックを作成および編集する方法

    Microsoft Teams で Power Virtual Agents チャットボットを作成する方法を学習したので、ボットにコンテンツを追加する方法を疑問に思うかもしれません。 Microsoft が提供するテンプレートをカスタマイズしてトピックを作成したり、新しいトピックを最初から作成したり、既存のヘルプ Web サイトから提案を取得したりできます。 前のガイドからボットを作成する際に問題が発生した場合は、ボットの作成に関する既知の問題を確認してください。 Power Virtual Agents チャットボットのトピック Power Virtual Agents (PVA) では

  2. Microsoft Planner を使用してワークフローを改善する方法

    職場または企業が Microsoft Office 365 を購読している場合、効率を改善するために活用できる優れたツールが多数あります。 Teams、Outlook、OneDrive、OneNote など、これらの一部については既に触れました。ただし、今度は Microsoft Planner に注意を向けます。 プロジェクト管理ツールである Planner は、無料または有料のサービスである Trello や Asana に似ています。追加料金なしで Office 365 に組み込まれており、組織が重要なタスクを追跡し、ワークフローを改善するのに役立ちます。ここでは、OnMSFT での使