Hi,
Im stuck on a flow that i am building, it seems whatever i do it still will not check the list and create or update.
Im trying to build a list of all current users and their groups in MS Shifts.
The trigger is the MS Shifts when a shift is created,
I first build an array of the data i need in the list, UserID, UserName, GroupID and Group Name.
I then use the array and a get Items to check for duplicates using x4 odata filter queries one for each above and a condition of length(body('Get_items')?['value']) greater than 0 . It just doubles up on the items already there?
The create and update are done via the following for e.g. the user name @{items('Apply_to_each_4')['User Display Name']}
Here is my flow, please help im quite stuck. I cannot understand why it doesn't check for previous entries

