cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KuhnsKC
Frequent Visitor

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

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!

2 REPLIES 2

Hey @KuhnsKC 

 

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!

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!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,546)