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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / when an item is create...
Power Automate
Suggested Answer

when an item is created or modified trigger conditions, how to avoid running the rule twice.

(0) ShareShare
ReportReport
Posted on by 2
Hello Everyone,
 
im trying to bring data from a sharepoint tracker to excel worksheet but if im using "when an item is created or modified trigger conditions", and if someone edit thier already existing entries in Sharepoint List power automate rule will run twice and create duplicate entries in excel sheet, so how to avoid those duplicate entries. currently im using the trigger "when an item is created". Please see the below screenshot.
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    I don't understand what you are trying to accomplish. With your current trigger, when an item is created, it will only run one time and will not run when it is modified. What you've done will avoid the duplicate entries. 
     
    What is most likely causing your issue is that you have a get items action in your flow, and then an apply to each for all the items you get. Get rid of the get items and apply to each actions, and just add the row to your Excel spreadsheet.
     
    What is the purpose of the get items and apply to each if you don't want to add multiple entries?
  • MP-27011023-0 Profile Picture
    2 on at
    Hello @David_MA ,
     
    Thank you very much for your help. I have changed the flow as per your suggestion but if someone is updating an already existing item in a sharepoint list, an additional row is getting created in excel sheet (with duplicate info). But Here i don't need any additional row for an existing item, only data needs to modify for existing item and create a new row for new item.
     
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    To do what you want, you will need to use a get rows action with a filter query on the columns to see if one already exists. You can use a length expression in a condition to determine how many items are returned from the get rows action. If it equals 0, then that means the row does not exist and you can add a new row on the yes side of the condition.

    However, I don't think this is what you really want since if someone updates the SharePoint item, it isn't going to find a matching row in the spreadsheet since the values in SharePoint no longer match what was previously added to Excel. You probably need to rethink your process. What is the point of adding the data to Excel when it is already in SharePoint?

    Your SharePoint list seems like it contains the data that is the "single source of truth." If you haven't heard of this concept before, read this article: What is the Source of Truth, and Why is it Important? | Kyligence

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard