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 / flow to add members to...
Power Automate
Answered

flow to add members to teams and post word document in this teams with power automate

(0) ShareShare
ReportReport
Posted on by 86

Hello

I have a flow that fires when an item is created or edited in a sharepoint list. In this list, there is a column that is called "Statutes". When a field in this column changes to "Yes", there is a Teams team that creates. A word document is automatically populated with data from the sharepoint list and it must be published to the general channel of the Teams team that is created

I have two problems:

Which card is used to automatically add multiple members to the created teams team? These members are in specific columns in my sharepoint list. I found a card where I can only add one member.

I have an error message that doesn't allow the word document to be published in Teams.

 

Lagloire_0-1665144810272.png

 

Lagloire_1-1665144853524.pngLagloire_2-1665144906540.png

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    With regards to adding multiple members to your Team, you would need to use an Apply to each to add each of the members using Add a member to a team. See my example below that adds each member from the Members column in my SharePoint list to the Team.

     

    A screenshot of my list for this example is below. Status is a choice field with No (default) and Yes options.

     

    grantjenkins_4-1665492131190.png

     

    Note that I also have a trigger condition so the flow will only run if the Status column is Yes. To set the condition click on the three dots and select Settings, then add the condition.

     

    grantjenkins_2-1665491988508.png

     

    grantjenkins_3-1665492039122.png

     

    Ideally you would also check the previous version to see if the field was already Yes or it changed to Yes (only create the Team if it was No before and changed to Yes). You can do this using the action Get changes for an item or a file (properties only)

     

     

    Below is the full flow.

     

    grantjenkins_1-1665491897392.png

     

    Note in the Add a member to a team action, the expression to get just the email from each Member is:

     

    items('Apply_to_each')?['Email']

     

     

     

    I'll have a look at the Word document issue and let you know.

     

     

  • Lagloire Profile Picture
    86 on at

    Hi @grantjenkins Thank you. It's working. Let me know regarding word document issue.

  • grantjenkins Profile Picture
    11,063 Moderator on at

    I don't think you will be able to post a Word document as a message in Teams chat. Did you want to save the Word document in the Files for that Channel then post a chat with a link to the Word document?

  • Lagloire Profile Picture
    86 on at

    ok thank you. In fact, when you create a team in Teams, automaticaly, an associated sharepoint group is created. Is there possible to create folder in this sharepoint group and save the word document in dynamically? 

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Each Channel in your MS Team is linked to a folder within the Documents Library in the SharePoint Site associated with the MS Team. So if you want to add the Word document to Channel A (for example) then you can use one of the SharePoint connectors to save the file to the Channel A folder in the Documents library. You would then post in the chat and provide a link to the Word document.

     

    I can create a quick example if you like - but just having dinner so probably be a few hours.

  • Lagloire Profile Picture
    86 on at

    ok thank you. Would be great to see a quick example. 

     

    Good dinner

  • grantjenkins Profile Picture
    11,063 Moderator on at

    Here's an example of a Word document being saved into the folder associated with my General Channel in my MS Team. It also generates a link to the Word document in the chat.

     

    grantjenkins_1-1665837072388.png

     

    Result in my Teams Chat

    grantjenkins_2-1665837152172.png

     

    And Word Document saved in my General Channel Files

    grantjenkins_3-1665837188509.png

     

     

     

  • Lagloire Profile Picture
    86 on at

    Dear @grantjenkins thank you for this quick example. If i'm not wrong, it seems like you already created your MS Team in other flow then you selected the associated sharepoint site with MS Team when you reach "Create File" step. 

     

    If we want to make all this in the same flow, i mean you create a MS Team, then, the Create file etc.....In this case, we don't yet have the MS team and the associated sharepoint site. My question to you, is there possible to make dynamically? 

    Example : In the same flow :

    1st : Create a team

    2nd: Create folder in the MS team associated sharepoint site

    3rd: Populate word document

    4th: Create file in the folder (in step 2)

    5th: Get file properties

    6th: Post message in Teams.

     

    Logically in my case, MS team will be create automaticaly when item is modified in certain sharepoint list. So i want that in the same flow, every time new MS team is created, new word doc will be created and post in the MS team associated sharepoint site.

  • Lagloire Profile Picture
    86 on at

    Dear @grantjenkins I did it exactly as you suggested and it is working only in the case that the MS Team is already created and we can find easily the associated sharepoint site. 

    In my case, we don't yet have the MS Team ans its sharepoint associated site. The MS team will be created in a flow and just after i will populate the word document. So, how can i make it dynamically work in the case that we don't yet create the MS Team?

  • grantjenkins Profile Picture
    11,063 Moderator on at

    As per the initial flow that adds the members to a Team - that flow creates a Team which will automatically get its own SharePoint site that you can add the Word document to.

     

    So, after you add the members, and after (outside) the Apply to each loop you would create the Word document then add it to the team you just created.

    grantjenkins_0-1666010690399.png

    Then Word creation and add to SharePoint site you just created as part of the Microsoft Team. You may also need to add a Delay action before you Create the file, so the SharePoint site has enough time to be created. And change all the MS Team and SharePoint inputs to be from the new Team you created.

    grantjenkins_1-1666010869474.png

     

    If this doesn't make sense, then I can create a full example for you - let me know.

     

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard