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

Get Teams Post Subject from Thread Replies

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

Problem to solve

Do you have the following problems with workflows originating from replies to Teams posts? - I want to quickly know which post (thread) it is when there's a reply containing a specific keyword - I want to quickly check and record the subject or summary of the original post just by looking at the reply message - I want to trigger subsequent processes (such as integration with a task management tool) based on a thread reply Using this recipe, the subject of the original post is automatically retrieved when a reply meets specific conditions. This allows you to instantly identify and link the original information from a reply, simplifying task management and information aggregation.

Completion Image

Flowchart for Get Teams Post Subject from Thread Replies

Ingredients

  • Teams iconTeams Connector

How to make

There are several ways to use the subject of a Teams post generically. For example, it's easier to manage by sharing the name (subject) with SharePoint list items or approval flow request names. In this recipe, when a specific post receives a reply, the subject of the post is retrieved based on the content of that reply (such as "Approved").

 

  • 1. Set the trigger "When keywords are mentioned"

Set the word to be extracted for [Search Keyword]. For [Message type], choose either Group chat or Channel. If you choose "Channel", select the team containing the corresponding channel for [Team]. Set the target channel ID for [Channels].  *It is convenient to input it directly from the T mark "Switch to detailed input of array items" on the right.   To find the ID, check the corresponding channel in Teams, click the "..." on the right side of the channel screen, and select "Copy link".   You will get a URL, and the string between https://teams.microsoft.com/l/channel/ and / is the ID.   If you don't know it, you can also paste the URL into Copilot and ask. Check the channel ID from the URL

 

  • 2. Set up the action "Get message details"

In this recipe, "Get message details" is used twice. First, in this step, get the details of the reply message to the post. Select the same ones as step 1 for [Team] and [Channel]. Set [Message] to "messageId" and [Parent message ID] to "replyToMessageId".  *The relationship between a post and a reply corresponds to a parent and child message.   Parent message means the parent message. Since there can be multiple messages mentioning the keyword, a Foreach is automatically created. The message is the reply ID, the parent message is the post ID

 

  • 3. Set up the action "Get message details"

In the second "Get message details", get the details of the parent message (post). Select the same ones as step 2 for [Team] and [Channel]. Set [Message] to "Reply To Id".  *Do not enter anything for [Parent message ID].   This is because there is no parent message for the posted message. Leave ParentMessage blank for the parent message

 

  • 4. Set up the action "Post message in a chat or channel"

This action is to confirm the output of steps 1-3. To check if the subject was retrieved, set [Message] to "Subject".  *As mentioned at the beginning, integration with SharePoint list items or approval flow request names is also possible. Set Subject and check the post subject

 

As shown in the figure below, reply to a post in a thread. In addition, include the word set as the extraction keyword, such as "Approved", in the reply. Reply to the post including the extraction keyword

 

When a reply containing the keyword is made, the original post message is identified. The subject of the identified post message is retrieved, and the flow bot chats it to an individual. Check via chat that the post subject was successfully retrieved

Related Recipes

広告
お問い合わせ