web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create MS Teams Group ...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on 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

Categories:
I have the same question (0)
  • Verified answer
    WillPage Profile Picture
    2,329 Super User 2026 Season 1 on at

    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.

     

  • Jflora Profile Picture
    7 on at

    @WillPage - Thank you! So far so good here!  I did take out #3 only because the email input into the (When a new email arrives (V3)) will only ever be an internal email to our corporation. Now that I think about it though, if they ever change that, it would be dynamic and the PA would still run, so I may add it back in.

     

    Thank you so much for stating this in a way that, after a little bit of digging helped me figure this out. I am very green with PA but I can definitely see its potential.

  • ERIC_A Profile Picture
    12 on at

    Update

    I found my issue. I made a mistake and I didn't initialize the variable as step 1 stated. my bad 

     

     

    hi,

    Step 6 has an issue. I cannot select any name on the Name field but not sure why. According to other cases the variable is not initialized but I followed the steps you mentioned above so I am thinking a SW upgrade or a code requirement changed causing my error ?

    ERIC_A_0-1664575397351.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard