cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tch999
New Member

Obtaining SharePoint site for a Microsoft Team generated via Power Automate

Hi all,

 

Been tearing my hair out with this one all day, so turning to the pros out there!

 

I'm trying to use Power Automate to trigger the creation of a Microsoft Team. I've got no real problem with that - I've set it to it scans for new messages with a particular text string in a folder which then triggers a Flow to parse the info in the email (it's an automated email from our CRM system). I've used a bit of Microsoft Graph code to get that to create the Team, assign the users and managed to build a list of Channels within the new Team with no problem.

 

My next task is to populate these Channels with some subfolders (and documents) in their respective files tabs. These are predetermined by a 'Template' Team I have setup, linked to a SharePoint site with the exact folder/file structure that I want to carry across to the new Team/Channels. I've tried all day to get Power Automate to somehow copy these across (assuming the run of the above Flow could act as the trigger or it could be tacked on the end), but I'm struggling to obtain the Sharepoint site address of the new Team/Channels. Is there a way of getting the SharePoint site address when you create a Team?

 

I feel like I'm so close with this, yet missing something pretty fundamental.

 

Happy to provide screenshots/code if needs be.

 

Thanks

 

 

3 REPLIES 3
efisher
Advocate I
Advocate I

Hi there,

instead of getting site url use MS Graph GET list all the channels/folders in the group like so

 

https://graph.microsoft.com/v1.0/groups/{group-id}/drive/root/children

 

since each channel is created in /Shared Documents/ and this folder is root you can get corresponding channel's folder by webUrl
you will need to parse json of the response to get each folder webUrl

one thing to remember when team is created it takes a bit of time to provision SP site so you might want to pause and wait for site to become available.

 

let me know if you have any questions.

e.

Thanks for the tip.

 

I must admit I'm pretty much a novice when it comes to working with Power Automate. Have you any tips for getting this code into my automation?

 

Thanks

 

Hi there, you mentioned you are using MS Graph: how are you using it and where?

can you post screens of your flow?

 

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,189)