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

Get my shifts using flow

Great to finally see some Shifts functionality in Microsoft flow, althought the current preview options are so limited it basically renders them pointless, hopefully this will change in time...

 

Has anyone managed to use the current flow activities to get all of the shifts assigned to themselves? I'm struggling to locate where (within flow) I can find my ID and then filter out all of my shifts within a specific date range

4 REPLIES 4
Super User
Super User

Re: Get my shifts using flow

Try Shifts: List all team shifts.

 

Then can you use a Select and Filter array to get the details you want and filter out only your records?

am549
Frequent Visitor

Re: Get my shifts using flow

Yes, but that gives me all of the teams shifts, not mine specifically. I can see nowhere currently where I can get my teams unique identifier to filter out my shifts, unless this is buried somewhere within the configuration

Super User
Super User

Re: Get my shifts using flow

In Office 365 Click your name on the top right

Click My profile

in the URL it will show your user id i.e. mine is: e91e8349-084d-41db-b5c8-f794528de425

 

this is the ID returned by the teams API in the user field of list all shifts -> Shifts Response Shifts Assigned to User ID.

 

I have a schedule with two users, my account has 2 shifts, the other account has 1 shift.

 

This is my flow to get my shifts (Obviously grab whatever details you need. Run the Select before adding the Parse JSON to grab the schema for the payload depending on what you select.:

 

1.png

 

 

Super User
Super User

Re: Get my shifts using flow

Also the action Get My profile (V2) returns the ID value if you wanted to get it dynamically for yourself, or you could use the Get user profile (V2) to get another users

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (6,007)