Power Automate iconPower Automate お助けレシピ集Power Automate お助けレシピ集 icon

Get a List of Teams Posts and Generate Access URLs

Date: 2026-03-19|Category: File/Data Management|Difficulty: Beginner

Problem to solve

Do you have the following problems with Teams post threads? - Post threads in channels are disorganized and unmanageable - You want to check the current number of posts - You want to manage which post has what interaction Using this recipe, you can get a list of post threads in a specific channel and also create URLs to access the respective posts.

Completion Image

Flowchart for Get a List of Teams Posts and Generate Access URLs

Ingredients

  • Teams iconTeams Connector
  • Excel iconExcel Connector

How to make

As interactions in Teams increase, posts in channels can become disorganized and hard to manage. To understand the current state of posts, retrieve a list to see how many posts there currently are. Also, after getting the posts, create URLs so you can understand what interactions are taking place.

 

  • 1. Set the trigger "Manually trigger a flow"

In this recipe, retrieving the post list is expected to be done at any timing, so it's a manual trigger. Get post list at any timing

 

  • 2. Set up the action "Get messages"

Set the [Team] and [Channel] that you want to understand the current state of.  *Since the return value of this action is a list of posts (there are multiple posts), a foreach will be automatically created from the next action. Set any desired Team and Channel

 

  • 3. Set up the action "Compose"

Create this inside the foreach from this action. To generate an access URL for the retrieved post, create the following expression.

concat('https://teams.microsoft.com/l/message/{Channel_ID}@thread.tacv2/', items('For_each')?['id'])

The concat function combines text, attaching the "post ID" obtained in step 2 to the Teams URL starting with "https". To check the Teams URL, for example, view the relevant post in Teams and select "Copy link". The structure of the obtained URL is as follows, and what is needed is the part before the "post ID".

https://teams.microsoft.com/l/message/{Channel_ID}@thread.tacv2/{Post_ID}?tenantId={Tenant_ID}&groupId={Group_ID}&parentMessageId={Parent_Message_ID}&teamName={Team_Name}&channelName={Channel_Name}&createdTime={Created_Time}

Generate access URL to Teams using concat function

 

  • 4. Set up the action "Add a row into a table"

Set [Location] to [Table] according to the Excel file used for retrieval. Note that you need to create a table for retrieving the list in Excel in advance. Prepare columns such as "Post Name" and "URL" there, and set them from the advanced parameters of this action. Settings for Excel retrieval

 

  • 5. Operation Check

When you run the flow, a list is created in Excel as shown in the figure below. Save post list to Excel

 

By clicking the URL in the URL column, you can access the relevant post. Access the post

Related Recipes

広告
お問い合わせ