Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Triggers
  • Resources
  • ABOUT ME
  • Get help with your flow
Menu

Get SharePoint address of Teams created by Power Automate

Posted on October 26, 2022October 26, 2022 by Tom

“I’m using Power Automate to create Teams and folder structure in that team, but it keeps telling me that the SharePoint address doesn’t exist!”


Every time you create a new team in Teams, you create also a new SharePoint site. That’s where all the files are being stored – in the good, old SharePoint. But that also means that if you want to create a folder structure in the new team, you create the folders on that SP site. Which is quite easy as Power Automate has actions to do that, all you need is the SharePoint site address. An address that can be different from the team name…

Why is there a difference?

When you create a new team, all you have is the team name. And since there’s no limitation for any special characters, you can get very creative with the team name. But it’s a bit different with the underlying SharePoint site url. The url is very strict about the allowed characters and it’ll ignore the invalid ones.

Taken to the extreme, the SP site url can have nothing in common with the team name.

Power Automate Teams SharePoint address

How to get the SharePoint address?

Since you can’t use the team name, you’ll have to look elsewhere, more specifically in the M365 groups.

Each team doesn’t have only its own SharePoint site, it has also a dedicated Microsoft 365 group. And such group combines the two pieces of information you need – name and email. As with the team name, there’s no limitation on the group name, but as with the SharePoint site url, there’s a limitation on the characters in the email. To put it more directly, the group name = team name, the group email = the SP site url.

After you create the team, list all your owned groups – you created the team, you’ll be one of the owners…

…add ‘Filter array’ to search for a group with the team name…

…and take the ‘Nickname’ output. Don’t worry about the ‘Apply to each’, if the team name is unique it’ll return just one entry. You can also add a ‘Delay’ action before listing the groups to make sure there’s enough time to create everything.

Power Automate Teams SharePoint address

Summary

As with SharePoint internal name, there can be a difference between a Teams team name and the underlying SP site address, which can be a problem in a Power Automate flow. In such situations you always need some connector between the values – this time the related Microsoft 365 group. The group has the same name as the team, and the same nickname as the SharePoint site. Add the tenant url to the nickname and you’ll have the SP site url.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

2 thoughts on “Get SharePoint address of Teams created by Power Automate”

  1. OliverR-82 says:
    November 27, 2022 at 2:50 pm

    There is another way that is, in my opinion, easier and more straightforward. The “Create a team” action returns a Team ID. You can use that ID to query the Graph API using the ‘Send an HTTP request’ action of the O365 Groups connector (NOT the SharePoint connector).

    The URI to query is the following:
    https: //graph.microsoft.com/v1.0/groups/ [ID of the team] /sites/root?$select=webUrl

    The returned value can then be used in subsequent actions by using the expression:
    body(‘Send_an_HTTP_request’)[‘webUrl’]

    Reply
    1. Tom says:
      December 5, 2022 at 8:10 pm

      Hello Oliver,
      thank you for sharing, I copied the URI in the first comment and remove the others. 🙂

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


There's also the HTTP requests to SharePoint cheat sheet to help you overcome limitations of some standard actions!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

  • How to find Excel rows missing in SharePoint list (Power Automate)March 29, 2023
  • Check whether user exists in AAD with Power AutomateMarch 26, 2023
  • How to highlight whole SharePoint row based on calculated dateMarch 22, 2023
  • Why is your Power Automate flow running so slow?March 19, 2023
  • How to add multiple links to the Power Automate approval taskMarch 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes