January 23, 2023

Teams Create Group Chat/ Open Chat

I describe in this blog post a nice functionality in the PowerTools to create quickly a Teams Group Chat or open a 1-1 Chat from a selection containing email addresses.

Use case description

It is quite a common use case to wish to open a Teams Chat with people listed in another application.

This other application could be Outlook, or Excel or any web page containing some email information.

This feature shall support multiple persons i.e. create a Group Chat in case multiple persons are selected.

PowerTools Solution

This kind of feature is implemented in the PowerTools suite: People Connector, TeamsShortcuts and Teamsy Launcher.

It is based on the Teams capability to create a Chat from a list of emails via a deep link

See Teams_Emails2Chat function in Lib/Teams.ahk 

Teams_Emails2Chat(sEmailList){
; Open Teams 1-1 Chat or Group Chat from list of Emails
sLink := "msteams:/l/chat/0/0?users=" . StrReplace(sEmailList, ";",",") ; msteams:
If InStr(sEmailList,";") { ; Group Chat
    InputBox, sTopicName, Enter Group Chat Name,,,,100
    if (ErrorLevel=0) { ;  TopicName defined
        sLink := sLink . "&topicName=" . StrReplace(sTopicName, ":", "")
    }
}
Run, %sLink%
} ; eofun

The user will be prompted via InputBox to enter the name of the Group chat.

Emails are extracted from the current selection with some RegExp parsing as implemented in the function People_GetEmailList in  Lib/People.ahk

๐Ÿ‘This also works from selected addressees in an Outlook Email or Meeting.

PowerTools Usage

From the People Connector you can run the function from the main menu.

From the TeamsShortcuts, you can also access the feature from the System Tray Icon Context Menu -> Open Chat

You can also run the function with the Teams Keyword "2c" (short for To Chat) or "oc" (Open Chat)

You will need to select some content to parse for Emails or have some emails copied to the clipboard before triggering the feature.

See also

Deep link to a Teams chat - Teams | Microsoft Learn

Outlook to Teams Group Chat (VBA)

No comments:

Post a Comment