Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Remove a row in Excel if a User Doesn't exist

(0) ShareShare
ReportReport
Posted on by

Hello!

 

First time here but I've found a ton of resources here that have helped me get this far. So I'm trying to have an updated spreadsheet of all users from 365 with various fields so that I can reference them in other Flows (texting with Twilio, emailing, etc.). My current flow takes 365 users, compares them to an Excel sheet using the ID as the unique identifier and if it doesn't exist, it adds a new row and if it does exist, it updates it with most recent information.

 

The next step I need is if a user exists in the spreadsheet but not in Office 365 (meaning they were deleted) - remove the row from Excel. I'd like to do it within this same Flow if I can. Any help would be awesome!

 

1.png2.png

 

Hoping I can create a new condition that says if the ID in the spreadsheet doesn't exist in the 365 objects, delete that row.

 

PS: I used materials online to build this and understand 90% of it but can somebody explain why I need the condition to see if the body is empty in this for it to work? I don't entirely understand what that's doing. I'm assuming I filter the data into the array and then if the array is blank (meaning no matches) then I add a new row, if not then update?

 

Thanks a bunch!

  • Community Power Platform Member Profile Picture
    on at
    Re: Remove a row in Excel if a User Doesn't exist

    Thanks for the suggestion! I tried that and it ended up removing all the rows in Excel. I tweaked it to say Excel Unique ID Doesn't contain O365 Unique ID and still nothing. Not sure why I'm struggling with this so bad.. Thanks for the help though!

  • yashag2255 Profile Picture
    24,442 Super User 2024 Season 1 on at
    Re: Remove a row in Excel if a User Doesn't exist

    Hey @Anonymous 

     

    You can probably add a parallel branch to check for items that exist in the array of excel output but not in the users output and delete it : 

    ff3.PNG

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

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!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,537 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,908 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow