web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automated Reminders Fo...
Power Automate
Suggested Answer

Automated Reminders For Teams Using PA

(0) ShareShare
ReportReport
Posted on by
I currently have a flow that will automatically scan my Teams channel for newly posted conversations. 
Power Automate scans the conversations every 1 minute (will be bumped to 1 hour once working properly) for replies in thread.
If no reply has been made it will auto-generate a reply in thread.
The issue I currently have is that it won't stop if a reply is present or if the bot has already replied in thread.
I basically need the autoreply to run 1 time only if no reply is present and that's it.
I had "Terminate" boxes in place but got no results from them.
Please help!
 
Flow.PNG
Categories:
I have the same question (0)
  • Suggested answer
    Ravi-Prajapati Profile Picture
    416 Moderator on at

    To ensure your Power Automate flow only triggers once if no reply is present and does not repeatedly send messages, follow these steps:


    1️⃣ Use a Condition to Check for Replies

    • In your flow, before sending the auto-reply, use the "List messages in a channel" or "Get messages (V3)" action.
    • Filter messages where replyToId matches the thread’s ID.
    • Count how many messages exist in that thread.

    2️⃣ Add a Condition to Stop Execution

    • Use the "Length()" function in a Condition action:
      length(body('Get_messages')?['value'])
      • If greater than 1, STOP (i.e., terminate the flow).
      • If equal to 1 (only the original message exists), send auto-reply.

    3️⃣ Track Whether the Bot Has Already Replied

    • To avoid duplicate replies, use Dataverse, SharePoint, or an Excel file to store:
      • The thread ID
      • A flag (true/false) indicating whether a reply was sent.
    • When running the flow:
      • Check this storage before sending a reply.
      • If already replied, exit.

    4️⃣ Alternative: Use a Do Until Loop with Exit Condition

    • Set a "Do Until" loop:
      • Check the thread for new replies.
      • If a reply is found, exit.
      • If X minutes pass with no reply, auto-reply.

    Example Flow Logic

    1️⃣ Trigger → Runs every minute/hour
    2️⃣ Get Messages → Retrieves all replies
    3️⃣ Condition: Check if messages > 1
        🔹 YesTerminate
        🔹 No → Check if bot has replied
    4️⃣ Send Auto-reply
    5️⃣ Mark Thread as Replied (Dataverse/SharePoint/Excel)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard