SOLVED: List all open shifts returns assigned shifts
EDIT: I solved this by iterating through the open shifts list in an 'Apply to Each'. Then, use 'Condition' to check whether the 'Open Shift Open Slot Count' = 0. If it does, use select to map the details you want and append to an array variable "openShifts" and do what you want with the info.
I'm using Power Automate to develop a flow that gets all the open shifts in the next fortnight and sends it in a summary email to relevant staff members.
Through some testing and debugging, I've deduced that the "List All Open Shifts" function is returning shifts that are not open shifts. When I look at the raw output, it's returning shifts that are all assigned, with 0 remaining open shifts. I've verified this by looking at the shift schedule in Teams and comparing it to the raw output. The schedule is definitely the most updated version as the "Share with team" button is greyed out.
I would appreciate any help or advice you might have. If you know another way to retrieve only the open shifts without using the function, I would like to hear it.
I've realises that the shifts have a value "openSlotCount": 0 for the shifts that are no longer open shifts. How can I access this value so that I can filter the list?