Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Auto Reply to MS Teams chat Once

(0) ShareShare
ReportReport
Posted on by 505
I am looking for a way to auto reply to only the first message in MS Teams. It sounds like I need a SharePoint list or Excel file to track the incoming message with a condition but I cannot seem to work through this. I am hoping someone else has done this and can help me develop it. 
 
Thanks
  • send2mark Profile Picture
    send2mark 505 on at
    Auto Reply to MS Teams chat Once
    User name does not seem to be an option for dynamic content. I am currently trying to get the "Message Conversation ID" to work, but it doesn't seem to be working.  
  • Suggested answer
    SwatiSTW Profile Picture
    SwatiSTW 311 on at
    Auto Reply to MS Teams chat Once
    You can achieve this with below steps
    1. Go to SharePoint and create a new list. Name it "TeamsMessageTracker". Add these columns:
      • Title: This will store the user’s display name.
      • User ID: This will store the user’s unique Teams ID.
      • Replied: This will be a Yes/No checkbox to track if a reply has been sent.
    2. Open Power Automate and create a new flow.
    3. Select the trigger "When a new message is posted in a channel" if you want to track channel messages. If you want to track personal chats, use the trigger "When a new message is posted in a chat". Note that personal chat tracking requires a premium license.
    4. After the trigger, add an action called "Get items" for SharePoint. Configure it to check your SharePoint list (TeamsMessageTracker) and filter by the User ID of the person who sent the message. This will check if the user already exists in the list.
    5. Add a condition. If the user does not exist in the list, continue with the next steps. If the user exists, stop the flow.
    6. If the user does not exist in the list, add an action to send an auto-reply. Use the action "Post a message in a chat or channel". Write your reply, for example: "Thank you for your message! I'll get back to you shortly."
    7. Add another action to create a new item in the SharePoint list. Save the user’s display name in the Title column, their unique Teams ID in the User ID column, and set Replied to Yes.
    8. End the flow after these steps.
    This way, the flow will only reply to the first message from a user, and it will track users in the SharePoint list to avoid replying multiple times. If you prefer not to use SharePoint, you can do the same with an Excel file instead.
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard