Creating a team from a Teams template is a great starting point, but in most real-world scenarios you’ll want to enhance that team with additional structure and content. In my previous post, Power Automate: Creating a Team from a team template, I walked through how to provision a new team via API using Power Automate.
In this follow‑up, I’ll take the next step: adding a tab to a channel in the newly created team. To do that, we first need to retrieve the team’s GUID, identify the correct channel, and then make the appropriate API call to create the tab. This post walks you through each part of that process, step by step.
Find the team guid
- Initialize a variable: Add an Initialize variable to the top of the flow, name that variable TeamGuid.
- Parse the HTTP response headers: After the HTTP action that creates the team, add a Parse JSON action. Use the response headers as the content and apply the following schema:
{
"type": "object",
"properties": {
"Location": {
"type": "string"
},
"Strict-Transport-Security": {
"type": "string"
},
"request-id": {
"type": "string"
},
"client-request-id": {
"type": "string"
},
"x-ms-ags-diagnostic": {
"type": "string"
},
"Date": {
"type": "string"
},
"Content-Location": {
"type": "string"
},
"Content-Length": {
"type": "string"
}
}
}
- Extract the GUID: Add a Set variable action, select the TeamGuid variable, and use the following expression. This pulls the team GUID from the Content-Location property:
first(split(last(split(body('Parse_JSON_-_Headers_-_Department')?['Content-Location'],'(''')),''')'))
- With the team GUID stored, we can now use it in subsequent API calls—such as retrieving channels and creating tabs.
Find the channel ID
To add a tab to a specific channel, we first need the channel’s unique ID. Using the team GUID retrieved in the previous step, we can query Microsoft Graph to list all channels and extract the one we need. Follow these steps:
- Initialize a variable: Add an Initialize variable action at the top of your flow and name it General Tab ID (or another name if you’re targeting a different channel).
- Retrieve the team’s channel details: Add a HTTP action and call it HTTP – Get Team Details.
- Set the Method to Get.
- Set the header key Authorization to value Bearer [access_token].
- Set the header Content-Type to value application/json.
- Set the header key Accept to value application/json.
- Set the URI to:
https://graph.microsoft.com/v1.0/teams/variables('TeamGuid')
- Parse the response: Add a Parse JSON action and set the Content to the body of the Get Teams Details HTTP action. Us the following schema:
{
"type": "object",
"properties": {
"@@odata.context": {
"type": "string"
},
"@@odata.count": {
"type": "integer"
},
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"createdDateTime": {
"type": "string"
},
"displayName": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"isFavoriteByDefault": {},
"email": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"webUrl": {
"type": "string"
},
"membershipType": {
"type": "string"
},
"isArchived": {
"type": "boolean"
}
}
}
}
}
}
- Filter for the correct channel: Add a Filter array action.
- Set the From to the value of the Parse JSON action.
- Set the filter to displayName is equal to [name of the channel] in my example I used the default General channel.
- Store the Channel ID: Add a Set variable action and select the General Tab ID.
- Set the value to the id from the Filter array.
- This will automatically create an Apply to each around the set variable action, because in theory there could be more than one tab with the name General.
Add the website tab
With both the team GUID and the channel ID available, we can now create a new tab in the target channel. In this example, we’ll add a website tab, but the same approach applies to other tab types supported by Microsoft Teams.
- Create the tab request: Add a HTTP action and call it HTTP – Get Team Details.
- Set the Method to Get.
- Set the header key Authorization to value Bearer [access_token].
- Set the header Content-Type to value application/json.
- Set the header key Accept to value application/json.
- Set the URI to:
https://graph.microsoft.com/v1.0/teams/variables('TeamGuid')}/channels/variables('General Tab ID')/tabs
- Define the tab configuration: Set the body of the request to the following JSON, and update the display name and website URLs to match your scenario:
{
"displayName": "Ben Prins Blog",
"teamsApp@odata.bind": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.web",
"configuration": {
"entityId": "Ben Prins Blog",
"contentUrl": "https://benprins.net",
"websiteUrl": "https://benprins.net"
}
}
- This call creates a new website tab in the specified channel using the provided configuration. Once executed, the tab will appear immediately in the team, giving users quick access to the linked content.








































