Skip to main content

Notifications

Community site session details

Community site session details

Session Id : JrelqVigyNFvVfYg8Clxlh
Power Automate - Building Flows
Answered

Stop trigger loops when SharePoint item is modified

Like (1) ShareShare
ReportReport
Posted on 30 Mar 2025 01:02:00 by 179
Hi Everyone,
 
I have a SharePoint Lists that keep data up-to-date for approval comments (when the other is modified).
However, this causes a loop, is there a way to prevent this?
 
Thanks a lot!
ROSE
  • ROSEBLACK Profile Picture
    179 on 31 Mar 2025 at 15:59:09
    Stop trigger loops when SharePoint item is modified
     
    I think the issue has been fixed.
    Correct Trigger Conditions:
     
    @equals(triggerOutputs()?['body/{ModerationStatus}'],'Pending')
     
    Thanks a lot!
    ROSE
     
     
  • ROSEBLACK Profile Picture
    179 on 31 Mar 2025 at 09:28:24
    Stop trigger loops when SharePoint item is modified
     
    Thank you, let me try on this.
     
    Thanks a lot!
    ROSE
  • Verified answer
    Michael E. Gernaey Profile Picture
    37,875 Super User 2025 Season 1 on 31 Mar 2025 at 07:18:35
    Stop trigger loops when SharePoint item is modified
     
    So to be clear, you are modifying the same file that has been triggered in the Flow Trigger?
     
    If that is so, then you have to come up with a way to make the trigger ignore it.
     
    So my questions are
    1. What field is getting changed?
    2. Is there a way (just think human speak not computer expressions) to check if a Specific Field has just been changed.
     
    For instance:
    If you had a Status Column.
    Its default value is No
     
    When someone updates it to Yes you can:
    Use the GetChanges action, right after the trigger.
     
    You can then Check if the specific field has changed (our Status Column). You can also check if the value is Yes.
     
    So you would do
     
    Trigger
    GetChanges
    Condition Action (to check if the specific column has changed, AND you can validate if it was changed to Yes or not)
     
    If condition 1 is true, and condition 2 is true (meaning our Status Column changed AND it was changed to Yes), we can made the changes
    but if condition 1 is false (no one made Status Column Change), then don't trigger the code, as you won't need to do anything
     
    The business logic depends on me understanding what you need to do 1 time, and never again so we can block it from doing it non-stop
     
  • creativeopinion Profile Picture
    10,300 Super User 2025 Season 1 on 30 Mar 2025 at 17:16:35
    Stop trigger loops when SharePoint item is modified
    @ROSEBLACK The equals operator looks for an exact match. To learn more about how to use Trigger Conditions in your flow and how to avoid infinite loops, you might be interested in the YT Tutorials linked below:
     
    In this Power Automate Tutorial I’m going to show you 3 ways to avoid an infinite loop. Keep in mind that there are more ways to avoid the infinite loop than what I’ll cover in this tutorial—choose the solution that works best for you.
    IN THIS VIDEO:
    âś“ Understanding What Causes Infinite Loops
    âś“ Avoiding Infinite Loops with the Recurrence Trigger
    âś“ Filtering to Return Files Only in Power Automate
    âś“ How to Output a Total Count in Power Automate with the length() function
    âś“ Using Trigger Conditions to Prevent Flow Re-triggering
    âś“ Leveraging Service Accounts to Avoid Infinite Loops
     
    ----
    Trigger conditions can be set in most flow triggers. These conditions you set must be true for the trigger to fire.
    In this Power Automate tutorial, I’m going to show you how to use trigger conditions in your flows to control when your Power Automate flows trigger. If your plan has flow run limits—you can avoid triggering your flows unnecessarily by using trigger conditions.
    I’ll cover four different flow examples that would benefit from trigger conditions:
     
    ⚡️ Triggering a flow when a column is changed to a specific value
    ⚡️ Triggering a Flow When an Event Updated or Deleted
    ⚡️ Triggering a Flow When a New Folder is Created
    ⚡️ Triggering a Flow When a Specific Email is Received
     
    I’ll also show you a trick on how to easily create the expressions needed and give you a few tips on how to troubleshoot your flow.
     
    IN THIS VIDEO:
    âś“ Four different flows that would benefit from trigger conditions
    âś“ What is a trigger condition?
    âś“ How to add a trigger condition to your flow
    âś“ How to trigger a flow when a column is changed to a specific value
    âś“ How to trigger a flow when an event is updated or Deleted
    âś“ How to trigger a flow when a new folder is created
    âś“ How to trigger a flow when a specific email is received
    âś“ How to troubleshoot a trigger condition
    âś“ How to prevent case sensitivity issues with a trigger condition
    âś“ How to use the filter array action to easily compose an expression that can be used in a trigger condition
     

     
    Hope this helps!

    Consider giving me a âť¤ď¸Ź if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • ROSEBLACK Profile Picture
    179 on 30 Mar 2025 at 14:14:51
    Stop trigger loops when SharePoint item is modified
    I have read the topic and follow the steps.
    It's not working for my flow. Your advise please?
     
    Thanks a lot!
    ROSE
  • ronaldwalcott Profile Picture
    1,863 on 30 Mar 2025 at 01:37:16
    Stop trigger loops when SharePoint item is modified
    Look at Get started with triggers - Power Automate | Microsoft Learn which explains how to add conditions to the trigger

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

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

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,513 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,636 Most Valuable Professional

Leaderboard
Loading started