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 / Update the row if not ...
Power Automate
Answered

Update the row if not exist in excel but also creating duplicate values inside excel (Outlook Mail to One Drive Excel Flow)

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi I am extracting the information from Outlook for Business and updating the excel file stored over One Drive for business, I am checking if the username is already exist in the excel row IF yes then just update the values if the username is not available in excel row then it creates a new username and add the values of it, but during this process I am able to update the row values and also create a new row if not exist but if the row is already available it updates the value and also creates a new row with duplicate values. Here is my flow.
The DataThe DataThe FlowThe Flow


Categories:
I have the same question (0)
  • Verified answer
    tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Anonymous ,

    this is caused by the 'Apply to each' on each row in the Excel file. The process will go as below.

    first Excel row:
    Name of Employee: Username1
    Condition: Username1 is equal to Username1?
    - update item
    
    second Excel row:
    Name of Employee: Username2
    Condition: Username 2 is equal to Username1?
    - create item

    You should avoid processing all the rows in the excel file, or at least not add/update row for each of them. My approach would be to use 'Get a row' to get the specific row only instead of 'List rows present in table'.

    Get a row: 'Name of Employee' Column with 'EmailStep2' Value
    parallel branches with different 'run after'
    - if action was successful, update the row
    - if action failed (row doesn't exist), create new row and terminate the flow with status 'Succeeded' 

    image.png

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Tom_Riha,

     

    I am having a similar issue to the one described by anonymous. 

    However, when I try to set up the flow as you suggest, the flow fails. 

    Here is the outcome:

     

    alessiom2003_0-1664288061902.png

     

    Ideally, I would like the flow to update a row if it exists, or create one if it doesn't. 

    Should I add a conditions? How? 

    Thank you very much in advance.

    Ale

  • tom_riha Profile Picture
    10,187 Most Valuable Professional on at

    Hello @Anonymous ,

    you're missing the 'Configure run after' setting on the 'Add a row...' branch - it should run only if the 'Get a row' has failed.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you very much. It works!!! 

    I don't have the button to accept this as a positive solution (probably because I am not the original creator of this post), but I can confirm that it does work.

     

    Tks Ale

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 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard