web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details
Power Automate - General Discussion
Answered

Create MS Teams Group Chat using CC in email(Office365)

Like (0) ShareShare
ReportReport
Posted on 8 Aug 2022 21:20:56 by 7

Hello everyone. Just getting into PowerAutomate and am trying to figure out how to send a Teams group chat message to everyone in the CC line of an email.  The top item is "When a new email arrives (V3)." If I manually enter a "Members to add" with "userID@domain.com" the group chat is created successfully and message sent. Manually entering these though defeats the purpose of what I am trying to do. I was hoping that the dynamic "CC" field from the first step would just pull over, which it will but by email address and that will not create a Teams Group Chat and it will fail. I then attempted to use the "Get User Profile (V2)" and then dynamically pull "User Principle Name," but that will only get one "UserID@domain.com" and none of the emails past the first. I can't be the first person to want to do something like this and I'm betting there is a simpler way. Any help would be very appreciated. Thanks!

 

TestforSend.jpg

  • Verified answer
    WillPage Profile Picture
    2,107 Super User 2025 Season 2 on 09 Aug 2022 at 02:26:19
    Re: Create MS Teams Group Chat using CC in email(Office365)

    I see it says you can use email addresses or IDs. Is it failing on email addresses because one or more the email addresses is not in your tenancy?

    If they all are and it's failing anyway (wouldn't surprise me to find a bug in PA) then you can do this:

     

    1. Initialise an array variable.

    2. Add a compose and put the expression split(triggerOutputs()?['body/ccRecipients'],';') in there

    3. Add a Filter array action with its input being the output from step 2 and the advanced mode condition being @endswith(item(), 'mydomain.com') where mydomain.com is your internal domain name. This is to filter out external people who you can't start a group chat with

    4. Add an Apply to each using the output of the Filter array action as its input

    5. Inside the Apply to each add a Get User Profile (V2) action using the Current item from dynamic content (or items('Apply_to_each') as an expression if it's not there)

    6. Still in the Apply to each, go Append to array variable and append the id dynamic content from the action above

    7. After the Apply to each loop, add a Join action and join the array variable on a semicolon character

    8. Use the output of the Join in your Teams action.

     

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete