Computer >> 컴퓨터 >  >> 체계 >> Windows

Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법

Microsoft Teams 상태를 자동으로 설정하는 기능은 근무 시간을 분산하여 집에서 일할 때 PC에 묶여 있다는 느낌을 받지 않도록 도와줍니다. 물론 언제든지 Microsoft Teams로 이동하여 상태를 수동으로 변경할 수 있지만 앱을 열지 않고도 Microsoft Teams 상태를 변경할 수 있는 기능이 있으면 더 좋지 않을까요?

Microsoft 365용으로 구축된 Power Automate를 사용하면 자동화를 통해 작업과 워크플로를 간소화하여 시간을 절약할 수 있습니다. 사용 가능한 많은 인기 있는 앱 템플릿이 있으므로 워크플로 또는 "흐름"을 생성하거나 자동화한 적이 없더라도 걱정할 필요가 없습니다.

상태 설정

이 가이드는 Power Automate를 통해 Teams 상태 업데이트를 수행하는 방법에 대한 게시물을 작성한 Microsoft MVP인 Damien Bird의 가이드를 기반으로 합니다. 나는 또한 Damien Bird가 그의 가이드 시작 부분에 남긴 경고를 반복할 것입니다.

이는 문서화되지 않은 방법이며 사용해서는 안 됩니다. 프로덕션 흐름에서는 작동하지만 항상 그런 것은 아니며 하루에 수행할 수 있는 흐름 수에 제한이 있습니다. 따라서 기대치를 확인하는 것이 중요합니다.

Damien Bird의 게시물에 나타나는 링크는 다음과 같습니다.

Power Automate에서 Microsoft Teams 상태를 설정하려면 다음을 수행하세요.

1. Power Automate에서 내 흐름 을 클릭합니다. 왼쪽 탐색 창에서.
2. 새 흐름을 클릭합니다. .
3. 여기에는 세 가지 옵션이 있습니다. 자동화된 클라우드 흐름 , 즉각적인 클라우드 흐름 또는 예약된 클라우드 흐름 . 이 예에서는 인스턴트 클라우드 흐름을 사용합니다. .
Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법4. 흐름 이름 만들기 이 흐름을 트리거하는 방법 선택에서 옵션을 클릭합니다. . 이 예에서는 흐름을 수동으로 트리거를 사용합니다. . 만들기를 클릭합니다. 확인이 끝나면. Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법
5. 만들기를 클릭한 후 , 새 흐름이 생성되고 수동 트리거로 시작된다는 것을 알게 될 것이므로 다음 단계를 선택해야 합니다. 다음 단계를 클릭합니다. .
Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법
6. 검색 상자에서 "SharePoint"를 검색하고 스크롤하여 SharePoint에 HTTP 요청 보내기를 클릭합니다. . Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법

Microsoft Teams 상태 설정

1. 다음 메뉴에서 SharePoint에 대한 HTTP 요청을 완료해야 합니다. . SharePoint 요청은 아래 이미지와 정확히 같아야 합니다.
Power Automate를 사용하여 Microsoft Teams 상태를 업데이트하는 방법
"가용성"을 변경할 수 있습니다. 흐름 본문에서 "사용 가능" 상태 , "바쁨" , "BeRightBack" , "방해 금지" , 또는 '자리 비움' . 오프라인/오프워크 옵션이 작동하지 않아 이 가이드에 포함할 수 없습니다.
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.