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

Notifications

Announcements

Community site session details

Community site session details

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

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,307 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard